Skip to content

Commit 99938f4

Browse files
authored
Merge pull request #5 from AlgorithmicGames/reboot
Reboot
2 parents f0a77d5 + 14c920f commit 99938f4

5 files changed

Lines changed: 1019 additions & 828 deletions

File tree

README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
# Worm-Arena
2-
Worm is a [Snake](https://en.wikipedia.org/wiki/Snake_(video_game_genre)) like arena.
3-
Click the image below to join the official Discord channel.
2+
3+
Worm is a [Snake](https://en.wikipedia.org/wiki/Snake_(video_game_genre)) like arena. Click the image below to join the official Discord channel.
44
<br>[![Discord banner2](https://discord.com/api/guilds/765291928454823936/widget.png?style=banner2)](https://discord.gg/wtFvtECqSX)
55

66
Participants receives a multidimensional array representing the current state of the arena and responds with the direction the worm should travel next. Possible responses are `'x+'`, `'x-'`, `'y+'`, `'y-'`, `'z-'` and `'z+'`. Responding with a invalid move (like turning backwards) results in moving forward.
77

88
**Message example**
9-
``` JavaScript
10-
[[[{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":4,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":{"type":"SolidWorm","team":3,"isLastTrailingBody":false},"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]}],[{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":2,"other":0},"occupiedBy":null,"grave":[]}],[{"eatables":{"apple":null,"other":0},"occupiedBy":{"type":"SolidWorm","team":1,"isLastTrailingBody":false},"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":{"type":"SolidWorm","team":0,"isLastTrailingBody":false},"grave":[]}],[{"eatables":{"apple":3,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]}],[{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":{"type":"SolidWorm","team":2,"isLastTrailingBody":false},"grave":[]},{"eatables":{"apple":1,"other":0},"occupiedBy":null,"grave":[]},{"eatables":{"apple":null,"other":0},"occupiedBy":null,"grave":[]}]]]
9+
10+
```JavaScript
11+
;[[[{ 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': 4, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': { 'type': 'SolidWorm', 'team': 3, 'isLastTrailingBody': false }, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }], [{ 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': 2, 'other': 0 }, 'occupiedBy': null, 'grave': [] }], [{ 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': { 'type': 'SolidWorm', 'team': 1, 'isLastTrailingBody': false }, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': { 'type': 'SolidWorm', 'team': 0, 'isLastTrailingBody': false }, 'grave': [] }], [{ 'eatables': { 'apple': 3, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }], [{ 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': { 'type': 'SolidWorm', 'team': 2, 'isLastTrailingBody': false }, 'grave': [] }, { 'eatables': { 'apple': 1, 'other': 0 }, 'occupiedBy': null, 'grave': [] }, { 'eatables': { 'apple': null, 'other': 0 }, 'occupiedBy': null, 'grave': [] }]]]
1112
```
13+
1214
Note that `eatables.apple` can either be `null` or a number. The number only represent an ID and is always only worth one point. When a worm is defeated and leaves eatables behind, they are put into `eatables.other`.
1315

1416
**Eatable example**
15-
``` JavaScript
17+
18+
```JavaScript
1619
{"eatables":{"apple":0,"other":0}}
1720
```
1821

1922
## Configurations
20-
*Basic description of each parameter. Some parameter combinations is incompatible. Read more at the arena.*
21-
| Scope | Value | Description |
22-
| --- | --- |---|
23-
| `arena` | `size` | Defines the size (length of each side) of the arena. |
24-
| `arena` | `threeDimensions` | If enable the size of the arena is `size*size*size` instead of `size*size`. |
25-
| `border` | `noOuterBorder` | If enable the worm will appear of the opposite side of the arena instead of colliding with a wall. |
26-
| `border` | `movesPerArenaShrink` | How many moves a worm can make before the arena shrinks. |
27-
| `border` | `shrinkMode` |`RandomPlacedWall_single`<br>A random wall is placed anywhere on the arena. <br>• `RandomPlacedWall_fourSymmetry`<br>Four walls are placed symmetrically on the arena. <br>• `RandomPlacedWall_perWorm`<br>One random wall pere living worm is placed anywhere on the arena. <br>• `WallOuterArea`<br>Playable arena shrinks my placing a wall on the most outer sides. |
28-
| `rules` | `startLength` | How long the worm will start as. |
29-
| `rules` | `apples` | How many apples is located at the arena and how they are placed. |
30-
| `rules` | `defeatedWorms` | What will happen to a defeated worm.<br>• `Disappears`<br>Defeated worms are removed.<br>• `Eatable`<br>Defeated worms becomes eatable for extra points.<br>• `Solid`<br>Defeated worms turns into a wall. |
31-
| `rules` | `winner` |`LastWormStanding`<br>Participants that are alive receive one point each time a worm is defeated. <br>• `MostPoints`<br>Participants receive one point for every eaten object until there is no more worms alive.|
32-
| `rules` | `bonusToLonger` | If two worms score equal, bonus point is dealt to the longer worm. |
23+
24+
_Basic description of each parameter. Some parameter combinations is incompatible. Read more at the arena._
25+
26+
| Scope | Value | Description |
27+
| -------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28+
| `arena` | `size` | Defines the size (length of each side) of the arena. |
29+
| `arena` | `threeDimensions` | If enable the size of the arena is `size*size*size` instead of `size*size`. |
30+
| `border` | `noOuterBorder` | If enable the worm will appear of the opposite side of the arena instead of colliding with a wall. |
31+
| `border` | `movesPerArenaShrink` | How many moves a worm can make before the arena shrinks. |
32+
| `border` | `shrinkMode` |`RandomPlacedWall_single`<br>A random wall is placed anywhere on the arena. <br>• `RandomPlacedWall_fourSymmetry`<br>Four walls are placed symmetrically on the arena. <br>• `RandomPlacedWall_perWorm`<br>One random wall pere living worm is placed anywhere on the arena. <br>• `WallOuterArea`<br>Playable arena shrinks my placing a wall on the most outer sides. |
33+
| `rules` | `startLength` | How long the worm will start as. |
34+
| `rules` | `apples` | How many apples is located at the arena and how they are placed. |
35+
| `rules` | `defeatedWorms` | What will happen to a defeated worm.<br>• `Disappears`<br>Defeated worms are removed.<br>• `Eatable`<br>Defeated worms becomes eatable for extra points.<br>• `Solid`<br>Defeated worms turns into a wall. |
36+
| `rules` | `winner` |`LastWormStanding`<br>Participants that are alive receive one point each time a worm is defeated. <br>• `MostPoints`<br>Participants receive one point for every eaten object until there is no more worms alive. |
37+
| `rules` | `bonusToLonger` | If two worms score equal, bonus point is dealt to the longer worm. |
3338

3439
To keep the challenge for all worms to be symmetric and equal, make sure to keep the amount of teams to an even number.

0 commit comments

Comments
 (0)