From 4b6b12c0aca2dd6aa291db4b915875e4e92d1de6 Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Mon, 2 Dec 2024 00:42:07 +0100 Subject: [PATCH] Updated 'Board' class. Updated the 'Board' class by adding the 'addPlayerData' method to it. --- .../mdga/model/src/main/java/pp/mdga/game/Board.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/game/Board.java b/Projekte/mdga/model/src/main/java/pp/mdga/game/Board.java index d7227511..0348c5a6 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/game/Board.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/game/Board.java @@ -33,6 +33,17 @@ public Board() { } } + /** + * This method will be used to add the given color and playerData parameters to the playerData attribute of + * Board class. + * + * @param color as the color of the player as a Color enumeration. + * @param playerData as the playerData of the player as a PlayerData object. + */ + public void addPlayerData(Color color, PlayerData playerData) { + this.playerData.put(color, playerData); + } + /** * This method returns the playerData *