public class DynamicConfiguration
extends de.smarten.tsuro.shared.gamemodel.Configuration
Constructor and Description |
---|
DynamicConfiguration()
A constructor that sets default values (orienting on the board version of Tsuro)
|
DynamicConfiguration(ArrayList<Integer> playerTiles,
int playerCount,
int roundTimePlayer,
int roundTimeAi,
int presentationTime,
int boardLength,
ArrayList<de.smarten.tsuro.shared.gamemodel.Position> blockedPositions)
A constructor that sets the given values
|
Modifier and Type | Method and Description |
---|---|
void |
addBlockedPosition(de.smarten.tsuro.shared.gamemodel.Position blockedPosition)
Adds one position to the clocked position array.
|
void |
cleanBlockedPositions()
Removes duplicates and not valid positions from the blocked positions ArrayList.
|
void |
removeBlockedPosition(de.smarten.tsuro.shared.gamemodel.Position blockedPosition)
Removes one position from the blocked position array.
|
void |
replacePlayerTile(int removeTileId,
int addTileId)
Replaces the first tileID in the playerTiles list with a new tileID
|
void |
setBlockedPositions(ArrayList<de.smarten.tsuro.shared.gamemodel.Position> blockedPositions) |
void |
setBoardLength(int boardLength) |
void |
setGui(GUI gui) |
void |
setPlayerCount(int count) |
void |
setPlayerTiles(ArrayList<Integer> playerTiles) |
void |
setPresentationTime(int presentationTime) |
void |
setRoundTimeAI(int roundTimeAi) |
void |
setRoundTimePlayer(int roundTimePlayer) |
String |
toString() |
void |
updatePlayerTiles()
Call this method if the needed count of player tiles changed (board size changed).
|
public DynamicConfiguration()
public DynamicConfiguration(ArrayList<Integer> playerTiles, int playerCount, int roundTimePlayer, int roundTimeAi, int presentationTime, int boardLength, ArrayList<de.smarten.tsuro.shared.gamemodel.Position> blockedPositions)
playerTiles
- an ArrayList of playerTiles that should be setplayerCount
- the actual player count that should be setroundTimePlayer
- the round time that should be set for a play to take his turnroundTimeAi
- the round time that should be set for the AI to take its turnpresentationTime
- the presentation timeboardLength
- the length of the boardblockedPositions
- the positions that should be set as blockedpublic void setGui(GUI gui)
public void replacePlayerTile(int removeTileId, int addTileId)
removeTileId
- the TileID to be removedaddTileId
- the TileID to be addedpublic void setRoundTimePlayer(int roundTimePlayer)
public void setRoundTimeAI(int roundTimeAi)
public void setPresentationTime(int presentationTime)
public void setBoardLength(int boardLength)
public void setBlockedPositions(ArrayList<de.smarten.tsuro.shared.gamemodel.Position> blockedPositions)
public void addBlockedPosition(de.smarten.tsuro.shared.gamemodel.Position blockedPosition)
blockedPosition
- the position to be addedpublic void removeBlockedPosition(de.smarten.tsuro.shared.gamemodel.Position blockedPosition)
blockedPosition
- the position to be removedpublic void setPlayerCount(int count)
public void updatePlayerTiles()
countOldPlayerTiles
- the number of tiles the player got previously.public void cleanBlockedPositions()
Copyright © 2017 smarTen. All rights reserved.