diff options
Diffstat (limited to 'game-engine')
-rw-r--r-- | game-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt | 16 | ||||
-rw-r--r-- | game-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt b/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt index 124cf435..2892cc29 100644 --- a/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt +++ b/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt @@ -1,11 +1,6 @@ package org.luxons.sevenwonders.game -import org.luxons.sevenwonders.game.api.Action -import org.luxons.sevenwonders.game.api.HandCard -import org.luxons.sevenwonders.game.api.PlayerMove -import org.luxons.sevenwonders.game.api.PlayerTurnInfo -import org.luxons.sevenwonders.game.api.toApiTable -import org.luxons.sevenwonders.game.api.toTableCard +import org.luxons.sevenwonders.game.api.* import org.luxons.sevenwonders.game.boards.Board import org.luxons.sevenwonders.game.boards.Table import org.luxons.sevenwonders.game.cards.Card @@ -50,7 +45,14 @@ class Game internal constructor( val action = determineAction(hand, player.board) val neighbourGuildCards = table.getNeighbourGuildCards(player.index).map { it.toTableCard(null) } - return PlayerTurnInfo(player.index, table.toApiTable(), action, hand, neighbourGuildCards) + return PlayerTurnInfo( + playerIndex = player.index, + table = table.toApiTable(), + action = action, + hand = hand, + preparedMove = preparedMoves[player.index]?.toPlayedMove(), + neighbourGuildCards = neighbourGuildCards + ) } /** diff --git a/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt b/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt index 9eccf935..1eefba81 100644 --- a/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt +++ b/game-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt @@ -15,6 +15,7 @@ data class PlayerTurnInfo internal constructor( val table: Table, val action: Action, val hand: List<HandCard>, + val preparedMove: PlayedMove?, val neighbourGuildCards: List<TableCard> ) { val currentAge: Int = table.currentAge |