added java docs to model/game and wrote the remaining getter and setter

This commit is contained in:
Hanno Fleischer
2024-11-14 15:32:27 +01:00
parent 0e90041209
commit c7b65d949a
4 changed files with 295 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
* This class will be used to hold all Board relevant data.
*/
public class Board {
private Map<Color, Player> playerData;
private Map<Color, PlayerData> playerData;
private Node[] infield;
/**
@@ -16,7 +16,12 @@ public Board() {
infield = new Node[40];
for (int i = 0; i < 40; i++) {
if (i % 10 == 0) {
infield[i] = new StartNode();
infield[i] = new StartNode(
i == 0 ? Color.ARMY :
i == 10 ? Color.AIRFORCE :
i == 20 ? Color.CYBER :
Color.NAVY
);
} else if (i == 4 || i == 14 || i == 24 || i == 34) {
infield[i] = new BonusNode();
} else {
@@ -30,7 +35,7 @@ public Board() {
*
* @return the playerData
*/
public Map<Color, Player> getPlayerData() {
public Map<Color, PlayerData> getPlayerData() {
return playerData;
}