public class MancalaBoard extends java.lang.Object implements Board
Constructor and Description |
---|
MancalaBoard() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDepotOfPlayer(int playerId)
Returns the depot id of the given playerId
|
java.lang.String |
getEnemySlotOf(java.lang.String id)
Returns the ID of the enemy slot of the given id
|
int |
getStonesPerSlot()
Getter for stones per slot
|
boolean |
isDepot(java.lang.String id)
Checks whether the given ID is a valid depot id
|
boolean |
isSlot(java.lang.String id)
Checks whether the given ID is a valid slot id
|
java.lang.String |
next(java.lang.String id)
Returns the next slot/depot given the id.
|
void |
setStonesPerSlot(int stonesPerSlot)
Setter for stones per slot.
|
public java.lang.String next(java.lang.String id)
id
- The current slot/depot idpublic int getStonesPerSlot()
public void setStonesPerSlot(int stonesPerSlot)
stonesPerSlot
- Sets the amount of stones per slot at the beginning of the game.public boolean isSlot(java.lang.String id)
id
- The questioned slot idpublic boolean isDepot(java.lang.String id)
id
- The questioned slot idpublic java.lang.String getEnemySlotOf(java.lang.String id)
id
- the ID of the own slotpublic java.lang.String getDepotOfPlayer(int playerId)
playerId
- the given player ID