forked from dzaima/ArtAttack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbattlebots.htm
94 lines (83 loc) · 2.28 KB
/
battlebots.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
<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>Red vs. Blue — Pixel Team Battlebots</title>
<link rel="icon" href="favicons/battlebots.png">
<meta name="stack-exchange-site" content="codegolf">
<meta name="stack-exchange-qid" content="48353">
<meta name="team-view-columns" content='[
{"title": "ID", "attribute": "userID"}
]'>
<meta name="team-type" content="user_id_modulo">
<meta name="team-type-args" content='{
"count": 2
}'>
<meta name="tournament-type" content="brawl">
<meta name="tournament-type-args" content='{}'>
<meta name="match-type" content="brawl">
<meta name="match-type-args" content='{
"count": 50,
"teamShuffle": "roundRobin"
}'>
<meta name="game-type" content="battlebots">
<meta name="game-config" content='{
"width": 128,
"height": 128,
"visibilityDistance": 16,
"maxFrame": 2048
}'>
<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": 3,
"colourscheme": "redblue"
}'>
<meta name="default-code" content="/*
* Inputs:
* move - move number (starts at 1)
* x - x coordinate of bot
* y - y coordinate of bot
* tCount - total friendly bots remaining (including out-of-sight)
* eCount - total enemy bots remaining (including out-of-sight)
* tNear - array of {x, y, id} for all visible friendly bots
* eNear - array of {x, y, id} for all visible enemy bots
* setMsg - function(message) sets the message attached to your bot
* getMsg - function(userID) gets the latest message attached to the given bot
*
* Return: integer [0-6] to move bot:
*
* Red Team: Blue team:
* 4 3 4 2 3
* 2 0 1 0
* 5 6 5 1 6
*
*/
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>