Skip to content

Commit 2f37eb8

Browse files
committed
fix(beetle): corrected wrong logic
1 parent 7e72c2f commit 2f37eb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/shared/sc/plugin2020/util/GameRuleLogic.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ object GameRuleLogic {
216216
@JvmStatic
217217
fun validateBeetleMove(board: Board, move: DragMove) {
218218
validateDestinationNextToStart(move)
219-
if ((sharedNeighboursOfTwoCoords(board, move.start, move.destination) + board.getField(move.destination) + board.getField(move.start)).any { !it.pieces.isEmpty() })
219+
if ((sharedNeighboursOfTwoCoords(board, move.start, move.destination) + board.getField(move.destination) + board.getField(move.start)).all { it.pieces.isEmpty() })
220220
throw InvalidMoveException("Beetle has to move along swarm")
221221
}
222222

0 commit comments

Comments
 (0)