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 -> {
|
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 -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user