mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Fikset markdown issues
Parprogrammering med Torbjørn
This commit is contained in:
parent
98cfb7e8e6
commit
e67c78e348
@ -24,6 +24,8 @@ public class RoboRallyGame implements IDrawableGame {
|
|||||||
private List<BoardElementContainer<Tile>> conveyorBelts;
|
private List<BoardElementContainer<Tile>> conveyorBelts;
|
||||||
private List<BoardElementContainer<Tile>> fastConveyorBelts;
|
private List<BoardElementContainer<Tile>> fastConveyorBelts;
|
||||||
private List<Player> playerList;
|
private List<Player> playerList;
|
||||||
|
private List<BoardElementContainer<Tile>> blacklistedTiles = new ArrayList<>();
|
||||||
|
private List<BoardElementContainer<Tile>> whitelistedTiles = new ArrayList<>();
|
||||||
|
|
||||||
public RoboRallyGame(boolean debug) {
|
public RoboRallyGame(boolean debug) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
@ -306,10 +308,6 @@ public class RoboRallyGame implements IDrawableGame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<BoardElementContainer<Tile>> blacklistedTiles = new ArrayList<>();
|
|
||||||
private List<BoardElementContainer<Tile>> whitelistedTiles = new ArrayList<>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds conveyor belts that can move without conflict
|
* Finds conveyor belts that can move without conflict
|
||||||
* @param conveyorBelts that should be checked
|
* @param conveyorBelts that should be checked
|
||||||
@ -328,6 +326,7 @@ public class RoboRallyGame implements IDrawableGame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<BoardElementContainer<Tile>> listOfRow = new ArrayList<>();
|
||||||
for (BoardElementContainer<Tile> conveyorBeltWithRobot : conveyorBeltsWithRobotsOn) {
|
for (BoardElementContainer<Tile> conveyorBeltWithRobot : conveyorBeltsWithRobotsOn) {
|
||||||
if (blacklistedTiles.contains(conveyorBeltWithRobot) ||
|
if (blacklistedTiles.contains(conveyorBeltWithRobot) ||
|
||||||
whitelistedTiles.contains((conveyorBeltWithRobot))) {
|
whitelistedTiles.contains((conveyorBeltWithRobot))) {
|
||||||
@ -335,7 +334,7 @@ public class RoboRallyGame implements IDrawableGame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BoardElementContainer<Tile> lastInRow = findLastRobotInRow (conveyorBeltWithRobot, conveyorBeltsWithRobotsOn);
|
BoardElementContainer<Tile> lastInRow = findLastRobotInRow (conveyorBeltWithRobot, conveyorBeltsWithRobotsOn);
|
||||||
List<BoardElementContainer<Tile>> listOfRow = new ArrayList<>();
|
|
||||||
List<BoardElementContainer<Tile>> results = findFirstRobotInRow(lastInRow, conveyorBeltsWithRobotsOn,
|
List<BoardElementContainer<Tile>> results = findFirstRobotInRow(lastInRow, conveyorBeltsWithRobotsOn,
|
||||||
listOfRow);
|
listOfRow);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user