added init for mdga with all states and messages

This commit is contained in:
Cedric Beck
2024-11-12 17:26:10 +01:00
parent ef16a3f92b
commit a684405891
238 changed files with 1596 additions and 44560 deletions

View File

@@ -0,0 +1,45 @@
package pp.mdga.game;
import java.util.Map;
/**
* This class will be used to hold all Board relevant data.
*/
public class Board {
private Map<Color, Player> playerData;
private Node[] infield;
/**
* This constructor is used to create a new board
*/
public Board() {
infield = new Node[40];
for (int i = 0; i < 40; i++) {
if (i % 10 == 0) {
infield[i] = new StartNode();
} else if (i == 4 || i == 14 || i == 24 || i == 34) {
infield[i] = new BonusNode();
} else {
infield[i] = new Node();
}
}
}
/**
* This method returns the playerData
*
* @return the playerData
*/
public Map<Color, Player> getPlayerData() {
return playerData;
}
/**
* This method returns the infield
*
* @return the infield
*/
public Node[] getInfield() {
return infield;
}
}