Skip to content

Commit 40bac6b

Browse files
committed
Removed the even amount of teams limit.
1 parent a8c1023 commit 40bac6b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ Note that `eatables.apple` can either be `null` or a number. The number only rep
2929
| `rules` | `apples` | How many apples is located at the arena and how they are placed. |
3030
| `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. |
3131
| `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+
33+
To keep the challenge for all worms to be symmetric and equal, make sure to keep the amount of teams to an even number.

arena.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,7 @@ function rotateArray(array){
606606
ArenaHelper.init = (participants, settings) => {
607607
_participants = participants;
608608
_settings = settings;
609-
if(_participants.countTeams()%2 !== 0 && !(_settings.rules.winner === 'MostPoints' && _participants.countTeams() === 1)){
610-
ArenaHelper.postAbort('', 'Uneven amount of teams is not supported, only MostPoints can be played with a single worm.');
611-
}else if(_settings.arena.size%2 !== 1){
609+
if(_settings.arena.size%2 !== 1){
612610
ArenaHelper.postAbort('', 'Arena size has to be uneven.');
613611
}else if(_settings.rules.winner === 'MostPoints' && _settings.rules.defeatedWorms !== 'Solid'){
614612
ArenaHelper.postAbort('', 'Incompatible rules: MostPoints can only be played with Solid.');

0 commit comments

Comments
 (0)