public class TurnChecker extends Object
Constructor and Description |
---|
TurnChecker() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isValidTokenPosition(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Token token) |
static boolean |
isValidTokenStartPos(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Token token)
Determines whether the token was placed at the edge of the board
|
static de.smarten.tsuro.shared.gamemodel.KickState |
simulateFirstTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Placement placement,
int playerId)
Simulates a turn with the available information and returns the PlayerState a server would return.
|
static PlayerState |
simulateTokenTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Token token,
int playerId)
Simulates a turn with the available information and returns the PlayerState a server would return
|
static PlayerState |
simulateTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
de.smarten.tsuro.shared.gamemodel.Tile tile,
de.smarten.tsuro.shared.gamemodel.Token token,
int playerId)
Simulates a turn with the available information and returns the PlayerState a server would return.
|
public static boolean isValidTokenPosition(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Token token)
gameModel
- the given GameModeltoken
- the token whose position should be checkedpublic static boolean isValidTokenStartPos(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Token token)
public static de.smarten.tsuro.shared.gamemodel.KickState simulateFirstTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Placement placement, int playerId)
public static PlayerState simulateTokenTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Token token, int playerId)
public static PlayerState simulateTurn(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, de.smarten.tsuro.shared.gamemodel.Tile tile, de.smarten.tsuro.shared.gamemodel.Token token, int playerId)
Copyright © 2017 smarTen. All rights reserved.