From cad7677bc6e8a784d48fcbeb47fa34b44859d5ef Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 7 Apr 2020 21:50:00 +0200 Subject: [PATCH] Legger til manglende kommentarer for GameStartInfo --- .../networking/containers/GameStartInfo.java | 58 ++++++++++++++----- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/src/main/java/inf112/fiasko/roborally/networking/containers/GameStartInfo.java b/src/main/java/inf112/fiasko/roborally/networking/containers/GameStartInfo.java index 86c0f14..d060020 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/containers/GameStartInfo.java +++ b/src/main/java/inf112/fiasko/roborally/networking/containers/GameStartInfo.java @@ -4,28 +4,58 @@ import inf112.fiasko.roborally.objects.Player; import java.util.List; +/** + * This class contains information about the game board to be used and the game's players + */ public class GameStartInfo { - private String boardname; - private List playerlist; - public GameStartInfo(){} + private String boardName; + private List playerList; - public void setBoardname(String boardname) { - this.boardname = boardname; + /** + * Empty initialization method used by kryo + */ + public GameStartInfo() {} + + /** + * Sets the name of the board to be used + * @param boardName The name of the board to be used, with extension + */ + public void setBoardName(String boardName) { + this.boardName = boardName; } - public void setPlayerlist(List playerlist) { - this.playerlist = playerlist; + /** + * Sets the list of players for the game + * @param playerList List of players for the game + */ + public void setPlayerList(List playerList) { + this.playerList = playerList; } - public GameStartInfo(String boardname, List playerlist){ - this.boardname=boardname; - this.playerlist=playerlist; + /** + * Instantiates a new GameStartInfo object + * @param boardName The name of the board to be used, with extension + * @param playerList List of players for the game + */ + public GameStartInfo(String boardName, List playerList) { + this.boardName = boardName; + this.playerList = playerList; } - public List getPlayerlist(){ - return playerlist; + + /** + * Gets the list of players + * @return A list of players + */ + public List getPlayerList() { + return playerList; } - public String getBoardname(){ - return boardname; + + /** + * Gets the board name + * @return The board name + */ + public String getBoardName() { + return boardName; } }