public class Configuration extends Object implements IConfiguration
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Position> |
blockedPositions
the blocked positions on the board which work like the border
|
protected int |
boardLength
the width of the board
|
protected int |
playerCount
the number of players the game is configured for
|
protected ArrayList<Integer> |
playerTiles
the number that each player gets of every tile.
|
protected int |
presentationTime
the time to update the GUI before a new turn starts
|
protected int |
roundTimeAi
the time every AI gets to make it's turn
|
protected int |
roundTimePlayer
the time every player gets to make his/her turn
|
Constructor and Description |
---|
Configuration(ArrayList<Integer> playerTiles,
int playerCount,
int roundTimePlayer,
int roundTimeAi,
int presentationTime,
int boardLength,
ArrayList<Position> blockedPositions) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ArrayList<Position> |
getBlockedPositions()
Please use
getBlockedPositionsIterator instead. |
Iterator<Position> |
getBlockedPositionsIterator() |
int |
getBoardLength()
returns the length of the board
|
int |
getBoardSize()
calculates the number of fields on the board (formula: boardLength*boardLength)
|
int |
getDeckSize()
calculates the deckSize (formula: (boardSize/2) + 1)
|
int |
getPlayerCount() |
ArrayList<Integer> |
getPlayerTiles() |
int |
getPresentationTime() |
int |
getRoundTimeAI() |
int |
getRoundTimePlayer() |
boolean |
isBlockedPosition(Position p) |
protected ArrayList<Integer> playerTiles
protected int playerCount
protected int roundTimePlayer
protected int roundTimeAi
protected int presentationTime
protected int boardLength
public ArrayList<Integer> getPlayerTiles()
getPlayerTiles
in interface IConfiguration
public int getPlayerCount()
getPlayerCount
in interface IConfiguration
public int getRoundTimePlayer()
getRoundTimePlayer
in interface IConfiguration
public int getRoundTimeAI()
getRoundTimeAI
in interface IConfiguration
public int getPresentationTime()
getPresentationTime
in interface IConfiguration
public int getBoardLength()
IConfiguration
getBoardLength
in interface IConfiguration
public int getBoardSize()
IConfiguration
getBoardSize
in interface IConfiguration
public int getDeckSize()
IConfiguration
getDeckSize
in interface IConfiguration
public ArrayList<Position> getBlockedPositions()
getBlockedPositionsIterator
instead.public Iterator<Position> getBlockedPositionsIterator()
getBlockedPositionsIterator
in interface IConfiguration
public boolean isBlockedPosition(Position p)
Copyright © 2017 smarTen. All rights reserved.