public final class StrategyUtility extends Object
Constructor and Description |
---|
StrategyUtility() |
Modifier and Type | Method and Description |
---|---|
static ArrayList<de.smarten.tsuro.shared.gamemodel.Position> |
calculatePossibleStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
calculates possible starting positions using the game's board length and forbidden tiles.
|
static de.smarten.tsuro.shared.gamemodel.Gate[] |
calculateValidTokenStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Placement placement)
This calculates the gates where a token could be placed without the player getting kicked
|
static de.smarten.tsuro.shared.gamemodel.Gate[] |
calculateValidTokenStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Position pos)
This calculates the gates where a token could be placed without the player getting kicked
|
static ArrayList<de.smarten.tsuro.shared.gamemodel.Position> |
fetchUnplaceablePositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Combines the positions marked as illegal and the positions that are already taken by other placements
|
static Stack<de.smarten.tsuro.shared.gamemodel.Tile> |
getAllTurns(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
Collection<de.smarten.tsuro.shared.gamemodel.Tile> handTiles)
Uses the handTiles to iterate through all possible tiles and rotations a player with these tiles could place
|
static boolean |
isOutOfBounds(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Position pos) |
public static Stack<de.smarten.tsuro.shared.gamemodel.Tile> getAllTurns(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, Collection<de.smarten.tsuro.shared.gamemodel.Tile> handTiles)
public static boolean isOutOfBounds(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Position pos)
gameModel
- the given GameModelpos
- the given positionpublic static ArrayList<de.smarten.tsuro.shared.gamemodel.Position> calculatePossibleStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel that is given for calculating possible starting positionspublic static de.smarten.tsuro.shared.gamemodel.Gate[] calculateValidTokenStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Position pos)
gameModel
- the given GameModelpos
- the given positionpublic static de.smarten.tsuro.shared.gamemodel.Gate[] calculateValidTokenStartPositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Placement placement)
gameModel
- the given GameModelplacement
- a not yet placed tile that'll be consideredpublic static ArrayList<de.smarten.tsuro.shared.gamemodel.Position> fetchUnplaceablePositions(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the gameModel the positions are saved inCopyright © 2017 smarTen. All rights reserved.