-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbotflocks.htm
101 lines (90 loc) · 2.6 KB
/
botflocks.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="content-security-policy" content="
base-uri 'self';
default-src 'none';
child-src blob:;
frame-src blob:;
connect-src https://api.stackexchange.com;
script-src 'self' 'unsafe-inline' blob:;
worker-src blob:;
style-src 'self';
img-src 'self';
form-action 'none';
">
<!-- these properties are read by the engine to configure the game -->
<title>Block Building Bot Flocks!</title>
<link rel="icon" href="favicons/botflocks.png">
<meta name="stack-exchange-site" content="codegolf">
<meta name="stack-exchange-qid" content="50690">
<meta name="team-view-columns" content='[
{"title": "ID", "attribute": "answerID"}
]'>
<meta name="team-type" content="free_for_all">
<meta name="team-type-args" content='{}'>
<meta name="tournament-type" content="all_v_all">
<meta name="tournament-type-args" content='{
"teamLimit": 2
}'>
<meta name="match-type" content="brawl">
<meta name="match-type-args" content='{
"count": 10,
"teamShuffle": "roundRobin"
}'>
<meta name="game-type" content="botflocks">
<meta name="game-config" content='{
"width": 128,
"height": 64,
"floorHeight": 8,
"flockSize": 8,
"visibilitySquare": 13,
"goalTimeLimit": 500,
"maxFrame": 2000
}'>
<meta name="play-config" content='{
"delay": 0,
"speed": 1
}'>
<meta name="play-screensaver-config" content='{
"delay": 10,
"speed": 1,
"swapDelay": 5000
}'>
<meta name="display-config" content='{
"scale": 6,
"colourscheme": "bluered",
"targetMarkerType": "ring"
}'>
<meta name="default-code" content="/*
* Inputs:
* p1 - are we player 1? (player 1 starts on the left)
* id - our answer ID
* eid - our current opponent's answer id
* move - move number (starts at 1)
* goal - object containing {x, y} giving the current location of the goal
* grid - function(x, y) which returns 1 if there is a wall at the requested
* location, 0 if there is no wall, and -1 if the location is not
* visible (or out-of-bounds)
* bots - list of {x, y, hasWall} for own bots
* ebots - list of {x, y, hasWall} for enemy bots
* getMem - function() which returns the current state of your entry's memory
* setMem - function(message) which sets your entry's memory
*
* Return: integer [0-24] to move/pick-up-wall/drop-wall:
*
* Move: Grab: Place:
* 1 2 3 9 10 11 17 18 19
* 4 0 5 12 13 20 21
* 6 7 8 14 15 16 22 23 24
*
*/
return 0;
">
<script src="core/requirejs.js"></script>
<script src="engine/entry.js" async></script>
</head>
<body>
<noscript>This viewer requires Javascript!</noscript>
</body>
</html>