added 2 methods for Test usage in Board and PlayerData
This commit is contained in:
@@ -47,4 +47,14 @@ public Map<Color, PlayerData> getPlayerData() {
|
|||||||
public Node[] getInfield() {
|
public Node[] getInfield() {
|
||||||
return infield;
|
return infield;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method sets a piece on a specific Node in the infield
|
||||||
|
*
|
||||||
|
* @param index the index of the node
|
||||||
|
* @param piece the piece to be set
|
||||||
|
*/
|
||||||
|
public void setPieceOnBoard(int index, Piece piece) {
|
||||||
|
infield[index].setOccupant(piece);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,4 +98,14 @@ public Piece removePieceFromWaitingArea() {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method sets a piece at the given index in the home area
|
||||||
|
*
|
||||||
|
* @param index the index of the node
|
||||||
|
* @param piece the piece to be set at the given index
|
||||||
|
*/
|
||||||
|
public void setPieceInHome(int index, Piece piece) {
|
||||||
|
homeNodes[index].setOccupant(piece);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user