Skip to content

Commit fabd761

Browse files
committed
Added support for single worm at MostPoints.
1 parent 8e5d7c6 commit fabd761

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arena.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ function rotateArray(array){
596596
ArenaHelper.init = (participants, settings) => {
597597
_participants = participants;
598598
_settings = settings;
599-
if(_participants.countTeams()%2 !== 0){
600-
ArenaHelper.postAbort('', 'Uneven amount of teams is not supported.');
599+
if(_participants.countTeams()%2 !== 0 && !(_settings.rules.winner === 'MostPoints' && _participants.countTeams() === 1)){
600+
ArenaHelper.postAbort('', 'Uneven amount of teams is not supported, only MostPoints can be played with a single worm.');
601601
}else if(_settings.arena.size%2 !== 1){
602602
ArenaHelper.postAbort('', 'Arena size has to be uneven.');
603603
}else if(_settings.rules.winner === 'MostPoints' && _settings.rules.defeatedWorms !== 'Solid'){

0 commit comments

Comments
 (0)