fix: only allow space stone on fully free fields
This commit is contained in:
parent
e68298781b
commit
dd8e9813fa
@ -131,8 +131,8 @@ public class GameLogic {
|
||||
case SpaceStone -> {
|
||||
verifyCoordinates(state, data.targetField);
|
||||
|
||||
if(state.entities.blocksMovement(data.targetField)) {
|
||||
throw new InvalidRequestException("Using space stone onto blocked field");
|
||||
if(state.entities.findByPosition(data.targetField).size() != 0) {
|
||||
throw new InvalidRequestException("Using space stone onto non-free field");
|
||||
}
|
||||
}
|
||||
case MindStone -> {
|
||||
|
Loading…
Reference in New Issue
Block a user