added a upadte robot spawn that updates the robot spawn location

This commit is contained in:
Tobydrama 2020-04-30 14:38:16 +02:00
parent e949af43bc
commit 76a1b344e1

View File

@ -62,6 +62,11 @@ public class Phase {
fireAllLasers(); fireAllLasers();
checkAllFlags(); checkAllFlags();
updateRobotRespawn();
}
public void updateRobotRespawn(){
gameBoard.updateRobotRespawn();
} }
/** /**
@ -109,7 +114,7 @@ public class Phase {
if (gameBoard.hasTouchedFlagThisTurn(robotID)) { if (gameBoard.hasTouchedFlagThisTurn(robotID)) {
continue; continue;
} }
gameBoard.updateRobotFlag(robotID, flag.getElement().getType()); gameBoard.updateRobotFlag(robotID, flag);
checkIfPlayerWon(robotID, flags.size()); checkIfPlayerWon(robotID, flags.size());
} }
} }