If I and @FalconsSky read this part of the code correctly then there is no mechanism that prevents the board from being completely empty or more probable from having less than 8 single fish fields, which are nessecary to play the start of the game.
The rand varaible can either be in the range of 0..4 every time
or be numbers bigger or equal to 20 until remainingFish is smaller than 21 and then just be in the range of 0..4
The board generator should in every possible case return a board that allows a full game to be played
https://github.com/software-challenge/backend/blob/de424a85285bc7b5eb4fb054f002ac307e22863f/plugin/src/main/kotlin/sc/plugin2023/Board.kt#L65
If I and @FalconsSky read this part of the code correctly then there is no mechanism that prevents the board from being completely empty or more probable from having less than 8 single fish fields, which are nessecary to play the start of the game.
The
rand
varaible can either be in the range of0..4
every time or be numbers bigger or equal to 20 untilremainingFish
is smaller than 21 and then just be in the range of0..4
The board generator should in every possible case return a board that allows a full game to be played