Gjør det mulig å hente ut spillere fra et tegnbart brett

This commit is contained in:
Kristian Knarvik 2020-04-21 16:13:07 +02:00
parent e4e4f04d23
commit 2d45f1ab66
2 changed files with 12 additions and 0 deletions

View File

@ -57,4 +57,11 @@ public interface DrawableGame {
* @return A list of all robots to draw * @return A list of all robots to draw
*/ */
List<Robot> getRobotsToDraw(); List<Robot> getRobotsToDraw();
/**
* Gets a list of active players to receive information about player names
*
* @return A list of players
*/
List<Player> getPlayers();
} }

View File

@ -114,6 +114,11 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
return gameBoard.getAliveRobots(); return gameBoard.getAliveRobots();
} }
@Override
public List<Player> getPlayers() {
return new ArrayList<>(this.playerList);
}
@Override @Override
public GameState getGameState() { public GameState getGameState() {
return gameState; return gameState;