mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-10-31 01:33:43 +01:00 
			
		
		
		
	La til en liste for players slik vi kan gi den videre til gamet.
This commit is contained in:
		| @@ -31,8 +31,9 @@ public class RoboRallyGame implements IDrawableGame { | ||||
|      * Instantiates a new robo rally game | ||||
|      * @param debug Whether to start the game in debugging mode | ||||
|      */ | ||||
|     public RoboRallyGame(boolean debug) { | ||||
|     public RoboRallyGame(List<Player> playerList, boolean debug) { | ||||
|         this.host=false; | ||||
|         this.playerList = playerList; | ||||
|         if (debug) { | ||||
|             initializeDebugMode(); | ||||
|         } else { | ||||
| @@ -43,8 +44,9 @@ public class RoboRallyGame implements IDrawableGame { | ||||
|     /** | ||||
|      * Instantiates a new robo rally game | ||||
|      */ | ||||
|     public RoboRallyGame() { | ||||
|     public RoboRallyGame(List<Player> playerList) { | ||||
|         this.host=false; | ||||
|         this.playerList = playerList; | ||||
|         initializeGame(); | ||||
|     } | ||||
|  | ||||
| @@ -146,15 +148,6 @@ public class RoboRallyGame implements IDrawableGame { | ||||
|      * @throws IOException If interrupted while trying to sleep | ||||
|      */ | ||||
|     private void initializePlayers() throws IOException { | ||||
|         playerList = new ArrayList<>(); | ||||
|         playerList.add(new Player(RobotID.ROBOT_1, "Player1")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_2, "Player2")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_3, "Player3")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_4, "Player4")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_5, "Player5")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_6, "Player6")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_7, "Player7")); | ||||
|         playerList.add(new Player(RobotID.ROBOT_8, "Player8")); | ||||
|         Deck<ProgrammingCard> cards =  DeckLoaderUtil.loadProgrammingCardsDeck(); | ||||
|         for (Player player : playerList) { | ||||
|             cards.shuffle(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Steinar Aalstad Lillesund
					Steinar Aalstad Lillesund