mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-03-03 08:39:45 +01:00
la til mulighet til å loade et manuellt test game
This commit is contained in:
parent
2f528c16bc
commit
290423cf38
@ -34,6 +34,7 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
|||||||
private List<ProgrammingCard> program;
|
private List<ProgrammingCard> program;
|
||||||
private ProgrammingCardDeck playerHand;
|
private ProgrammingCardDeck playerHand;
|
||||||
private ProgrammingCardDeck extraCards;
|
private ProgrammingCardDeck extraCards;
|
||||||
|
private Boolean testingMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new Robo Rally game
|
* Instantiates a new Robo Rally game
|
||||||
@ -44,7 +45,8 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
|||||||
* @param server The server if this player is host. Should be null otherwise
|
* @param server The server if this player is host. Should be null otherwise
|
||||||
*/
|
*/
|
||||||
public RoboRallyGame(List<Player> playerList, String boardName, String playerName,
|
public RoboRallyGame(List<Player> playerList, String boardName, String playerName,
|
||||||
RoboRallyServer server) {
|
RoboRallyServer server,Boolean testingMode) {
|
||||||
|
this.testingMode=testingMode;
|
||||||
this.playerName = playerName;
|
this.playerName = playerName;
|
||||||
this.host = server != null;
|
this.host = server != null;
|
||||||
this.playerList = playerList;
|
this.playerList = playerList;
|
||||||
@ -244,7 +246,13 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
|||||||
TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER);
|
TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER);
|
||||||
|
|
||||||
if (host) {
|
if (host) {
|
||||||
mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck();
|
if(testingMode){
|
||||||
|
mainDeck = DeckLoaderUtil.loadProgrammingCardsTestDeck();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
phase = new Phase(gameBoard, playerList, 600, this);
|
phase = new Phase(gameBoard, playerList, 600, this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user