diff options
Diffstat (limited to 'sw-engine')
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt | 10 | ||||
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt index 931360d6..5a75516c 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt @@ -5,7 +5,7 @@ import org.luxons.sevenwonders.engine.boards.Table import org.luxons.sevenwonders.engine.cards.Card import org.luxons.sevenwonders.engine.cards.Decks import org.luxons.sevenwonders.engine.cards.Hands -import org.luxons.sevenwonders.engine.converters.toGameState +import org.luxons.sevenwonders.engine.converters.toTableState import org.luxons.sevenwonders.engine.converters.toPlayedMove import org.luxons.sevenwonders.engine.converters.toTableCard import org.luxons.sevenwonders.engine.data.LAST_AGE @@ -14,7 +14,7 @@ import org.luxons.sevenwonders.engine.moves.Move import org.luxons.sevenwonders.engine.moves.resolve import org.luxons.sevenwonders.engine.score.ScoreBoard import org.luxons.sevenwonders.model.Action -import org.luxons.sevenwonders.model.GameState +import org.luxons.sevenwonders.model.TableState import org.luxons.sevenwonders.model.PlayerMove import org.luxons.sevenwonders.model.PlayerTurnInfo import org.luxons.sevenwonders.model.cards.CardBack @@ -54,7 +54,7 @@ class Game internal constructor( return PlayerTurnInfo( playerIndex = player.index, - table = table.toGameState(), + table = table.toTableState(), action = action, hand = hand, preparedMove = preparedMoves[player.index]?.toPlayedMove(), @@ -107,7 +107,7 @@ class Game internal constructor( * had not prepared their moves (unless these players had nothing to do). To avoid this, please check if everyone * is ready using [allPlayersPreparedTheirMove]. */ - fun playTurn(): GameState { + fun playTurn(): TableState { makeMoves() if (endOfAgeReached()) { executeEndOfAgeEvents() @@ -118,7 +118,7 @@ class Game internal constructor( rotateHandsIfRelevant() startNewTurn() } - return table.toGameState() + return table.toTableState() } private fun makeMoves() { diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt index 77843334..290b3dc9 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt @@ -4,9 +4,9 @@ import org.luxons.sevenwonders.engine.SimplePlayer import org.luxons.sevenwonders.engine.moves.Move import org.luxons.sevenwonders.model.PlayedMove import org.luxons.sevenwonders.engine.boards.Table -import org.luxons.sevenwonders.model.GameState +import org.luxons.sevenwonders.model.TableState -internal fun Table.toGameState(): GameState = GameState( +internal fun Table.toTableState(): TableState = TableState( boards = boards.mapIndexed { i, b -> b.toApiBoard(SimplePlayer(i, this), lastPlayedMoves.getOrNull(i)) }, currentAge = currentAge, handRotationDirection = handRotationDirection, |