Skip to content

Fix test for placing a ship vertically

In a game with many ships that may not border each other, it is possible to place them one by one in a way that it is impossible to place all of them.

There is a test for this case to get out of this situation, but it yields false positives if horizontal placing is not possible, because the part for the vertical placement is broken. The user needs to start over, although proper placement would be possible.

The bug is in the test for vertically placing a ship: row/column coordinates are swapped. Fix it by unswapping them.

Merge request reports