fix: only allow space stone on fully free fields

This commit is contained in:
punchready 2021-08-06 15:31:32 +02:00
parent e68298781b
commit dd8e9813fa

View File

@ -131,8 +131,8 @@ public class GameLogic {
case SpaceStone -> { case SpaceStone -> {
verifyCoordinates(state, data.targetField); verifyCoordinates(state, data.targetField);
if(state.entities.blocksMovement(data.targetField)) { if(state.entities.findByPosition(data.targetField).size() != 0) {
throw new InvalidRequestException("Using space stone onto blocked field"); throw new InvalidRequestException("Using space stone onto non-free field");
} }
} }
case MindStone -> { case MindStone -> {