mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-07-28 18:55:26 +02:00
Forenkler skjermer og fjerner en bug som gjorde at knapper hang fast
This commit is contained in:
@@ -180,7 +180,7 @@ public class Board {
|
||||
Robot alternateRobot = getRobotFromDeadRobots(robotID);
|
||||
if (robots.containsKey(robotID)) {
|
||||
robots.get(robotID).setPowerDown(powerDown);
|
||||
} else if ( alternateRobot != null) {
|
||||
} else if (alternateRobot != null) {
|
||||
alternateRobot.setPowerDown(powerDown);
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ public class Board {
|
||||
//If another robot is standing on a conveyor belt pointing to the tile in front, a conflict happens
|
||||
return (isValidPosition(frontLeftPosition) && isConveyorBelt(getTileOnPosition(frontLeftPosition)) &&
|
||||
getTileOnPosition(frontLeftPosition).getDirection() ==
|
||||
Direction.getRightRotatedDirection(conveyorBeltDirection) && hasRobotOnPosition(frontLeftPosition)) ||
|
||||
Direction.getRightRotatedDirection(conveyorBeltDirection) && hasRobotOnPosition(frontLeftPosition)) ||
|
||||
(isValidPosition(frontRightPosition) && isConveyorBelt(getTileOnPosition(frontRightPosition))
|
||||
&& getTileOnPosition(frontRightPosition).getDirection() ==
|
||||
Direction.getLeftRotatedDirection(conveyorBeltDirection)
|
||||
|
@@ -21,11 +21,11 @@ public class Phase {
|
||||
private final Board gameBoard;
|
||||
private final List<Player> playerList;
|
||||
private final int cycleDelay;
|
||||
private final InteractableGame game;
|
||||
private List<BoardElementContainer<Tile>> cogwheels;
|
||||
private List<BoardElementContainer<Tile>> conveyorBelts;
|
||||
private List<BoardElementContainer<Tile>> fastConveyorBelts;
|
||||
private List<BoardElementContainer<Tile>> flags;
|
||||
private final InteractableGame game;
|
||||
|
||||
/**
|
||||
* Instantiates a new phase
|
||||
|
@@ -24,6 +24,7 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
||||
private final boolean host;
|
||||
private final String playerName;
|
||||
private final RoboRallyServer server;
|
||||
private final Phase phase;
|
||||
private Board gameBoard;
|
||||
private List<BoardElementContainer<Tile>> repairTiles;
|
||||
private Deck<ProgrammingCard> mainDeck;
|
||||
@@ -31,7 +32,6 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
||||
private String winningPlayerName;
|
||||
private List<ProgrammingCard> program;
|
||||
private ProgrammingCardDeck playerHand;
|
||||
private final Phase phase;
|
||||
|
||||
/**
|
||||
* Instantiates a new Robo Rally game
|
||||
|
Reference in New Issue
Block a user