From 036fc87fa4759dca994964ede7732ffa9f6dd4a3 Mon Sep 17 00:00:00 2001 From: jbion Date: Mon, 20 May 2019 11:46:01 +0200 Subject: Move some declarations to a better place --- .../org/luxons/sevenwonders/game/api/ApiTable.kt | 25 +++++++++ .../org/luxons/sevenwonders/game/api/Boards.kt | 44 --------------- .../luxons/sevenwonders/game/api/PlayerTurnInfo.kt | 2 +- .../org/luxons/sevenwonders/game/api/Table.kt | 24 --------- .../org/luxons/sevenwonders/game/boards/Boards.kt | 40 ++++++++++++++ .../org/luxons/sevenwonders/game/cards/Cards.kt | 2 +- .../luxons/sevenwonders/game/resources/Provider.kt | 8 --- .../game/resources/ResourceTransactions.kt | 9 ---- .../sevenwonders/game/resources/ResourceType.kt | 26 --------- .../sevenwonders/game/resources/Resources.kt | 44 +++++++++++++++ .../org/luxons/sevenwonders/game/wonders/Wonder.kt | 2 +- .../kotlin/org/luxons/sevenwonders/game/Game.kt | 2 +- .../org/luxons/sevenwonders/game/api/Boards.kt | 63 ++++++++++++---------- .../org/luxons/sevenwonders/game/api/Table.kt | 2 +- .../game/resources/ResourceTransactions.kt | 5 +- .../org/luxons/sevenwonders/game/test/TestUtils.kt | 4 +- .../sevenwonders/controllers/GameController.kt | 4 +- 17 files changed, 156 insertions(+), 150 deletions(-) create mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/ApiTable.kt delete mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt delete mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt create mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/Boards.kt delete mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt delete mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt delete mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt create mode 100644 sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/ApiTable.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/ApiTable.kt new file mode 100644 index 00000000..595064b1 --- /dev/null +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/ApiTable.kt @@ -0,0 +1,25 @@ +package org.luxons.sevenwonders.game.api + +import org.luxons.sevenwonders.game.boards.ApiBoard +import org.luxons.sevenwonders.game.cards.HandRotationDirection +import org.luxons.sevenwonders.game.cards.TableCard +import org.luxons.sevenwonders.game.moves.MoveType +import org.luxons.sevenwonders.game.resources.ResourceTransactions + +typealias Age = Int + +data class ApiTable( + val boards: List, + val currentAge: Age, + val handRotationDirection: HandRotationDirection, + val lastPlayedMoves: List +) { + val nbPlayers: Int = boards.size +} + +data class PlayedMove( + val playerIndex: Int, + val type: MoveType, + val card: TableCard, + val transactions: ResourceTransactions +) diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt deleted file mode 100644 index 698615e9..00000000 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.luxons.sevenwonders.game.api - -import org.luxons.sevenwonders.game.cards.TableCard -import org.luxons.sevenwonders.game.resources.ResourceType -import org.luxons.sevenwonders.game.wonders.ApiWonder - -data class Board( - val playerIndex: Int, - val wonder: ApiWonder, - val production: ApiProduction, - val publicProduction: ApiProduction, - val science: ApiScience, - val military: ApiMilitary, - val playedCards: List>, - val gold: Int -) - -data class ApiRequirements( - val gold: Int = 0, - val resources: List = emptyList() -) - -data class ApiProduction( - val fixedResources: List, - val alternativeResources: Set> -) - -data class ApiCountedResource( - val count: Int, - val type: ResourceType -) - -data class ApiMilitary( - val nbShields: Int, - val totalPoints: Int, - val nbDefeatTokens: Int -) - -data class ApiScience( - val jokers: Int, - val nbWheels: Int, - val nbCompasses: Int, - val nbTablets: Int -) diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt index c5feb6c5..db177fee 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/PlayerTurnInfo.kt @@ -17,7 +17,7 @@ enum class Action(val message: String) { data class PlayerTurnInfo( val playerIndex: Int, - val table: Table, + val table: ApiTable, val action: Action, val hand: List, val preparedMove: PlayedMove?, diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt deleted file mode 100644 index 23ab6ee2..00000000 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.luxons.sevenwonders.game.api - -import org.luxons.sevenwonders.game.cards.HandRotationDirection -import org.luxons.sevenwonders.game.cards.TableCard -import org.luxons.sevenwonders.game.moves.MoveType -import org.luxons.sevenwonders.game.resources.ResourceTransactions - -typealias Age = Int - -data class Table( - val boards: List, - val currentAge: Age, - val handRotationDirection: HandRotationDirection, - val lastPlayedMoves: List -) { - val nbPlayers: Int = boards.size -} - -data class PlayedMove( - val playerIndex: Int, - val type: MoveType, - val card: TableCard, - val transactions: ResourceTransactions -) diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/Boards.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/Boards.kt new file mode 100644 index 00000000..eb044cf2 --- /dev/null +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/boards/Boards.kt @@ -0,0 +1,40 @@ +package org.luxons.sevenwonders.game.boards + +import org.luxons.sevenwonders.game.cards.TableCard +import org.luxons.sevenwonders.game.resources.CountedResource +import org.luxons.sevenwonders.game.resources.ResourceType +import org.luxons.sevenwonders.game.wonders.ApiWonder + +data class ApiBoard( + val playerIndex: Int, + val wonder: ApiWonder, + val production: ApiProduction, + val publicProduction: ApiProduction, + val science: ApiScience, + val military: ApiMilitary, + val playedCards: List>, + val gold: Int +) + +data class ApiRequirements( + val gold: Int = 0, + val resources: List = emptyList() +) + +data class ApiProduction( + val fixedResources: List, + val alternativeResources: Set> +) + +data class ApiMilitary( + val nbShields: Int, + val totalPoints: Int, + val nbDefeatTokens: Int +) + +data class ApiScience( + val jokers: Int, + val nbWheels: Int, + val nbCompasses: Int, + val nbTablets: Int +) diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt index ab0e0297..1fc228d1 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt @@ -1,6 +1,6 @@ package org.luxons.sevenwonders.game.cards -import org.luxons.sevenwonders.game.api.ApiRequirements +import org.luxons.sevenwonders.game.boards.ApiRequirements import org.luxons.sevenwonders.game.resources.ResourceTransactions data class TableCard( diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt deleted file mode 100644 index 5d0f3159..00000000 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Provider.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.luxons.sevenwonders.game.resources - -import org.luxons.sevenwonders.game.boards.RelativeBoardPosition - -enum class Provider(val boardPosition: RelativeBoardPosition) { - LEFT_PLAYER(RelativeBoardPosition.LEFT), - RIGHT_PLAYER(RelativeBoardPosition.RIGHT) -} diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt deleted file mode 100644 index 77a8670d..00000000 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt +++ /dev/null @@ -1,9 +0,0 @@ -package org.luxons.sevenwonders.game.resources - -import org.luxons.sevenwonders.game.api.ApiCountedResource - -typealias ResourceTransactions = Collection - -data class ResourceTransaction(val provider: Provider, val resources: List) - -fun noTransactions(): ResourceTransactions = emptySet() diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt deleted file mode 100644 index 5c92b887..00000000 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceType.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.luxons.sevenwonders.game.resources - -enum class ResourceType(val symbol: Char) { - WOOD('W'), - STONE('S'), - ORE('O'), - CLAY('C'), - GLASS('G'), - PAPYRUS('P'), - LOOM('L'); - - companion object { - - private val typesPerSymbol = values().map { it.symbol to it }.toMap() - - fun fromSymbol(symbol: String): ResourceType { - if (symbol.length != 1) { - throw IllegalArgumentException("The given symbol must be a valid single-char resource type, got $symbol") - } - return fromSymbol(symbol[0]) - } - - fun fromSymbol(symbol: Char?): ResourceType = - typesPerSymbol[symbol] ?: throw IllegalArgumentException("Unknown resource type symbol '$symbol'") - } -} diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt new file mode 100644 index 00000000..926cd570 --- /dev/null +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt @@ -0,0 +1,44 @@ +package org.luxons.sevenwonders.game.resources + +import org.luxons.sevenwonders.game.boards.RelativeBoardPosition + +enum class ResourceType(val symbol: Char) { + WOOD('W'), + STONE('S'), + ORE('O'), + CLAY('C'), + GLASS('G'), + PAPYRUS('P'), + LOOM('L'); + + companion object { + + private val typesPerSymbol = values().map { it.symbol to it }.toMap() + + fun fromSymbol(symbol: String): ResourceType { + if (symbol.length != 1) { + throw IllegalArgumentException("The given symbol must be a valid single-char resource type, got $symbol") + } + return fromSymbol(symbol[0]) + } + + fun fromSymbol(symbol: Char?): ResourceType = + typesPerSymbol[symbol] ?: throw IllegalArgumentException("Unknown resource type symbol '$symbol'") + } +} + +data class CountedResource( + val count: Int, + val type: ResourceType +) + +enum class Provider(val boardPosition: RelativeBoardPosition) { + LEFT_PLAYER(RelativeBoardPosition.LEFT), + RIGHT_PLAYER(RelativeBoardPosition.RIGHT) +} + +data class ResourceTransaction(val provider: Provider, val resources: List) + +typealias ResourceTransactions = Collection + +fun noTransactions(): ResourceTransactions = emptySet() diff --git a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt index 6480e935..13fee8e2 100644 --- a/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt +++ b/sw-common-model/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt @@ -1,6 +1,6 @@ package org.luxons.sevenwonders.game.wonders -import org.luxons.sevenwonders.game.api.ApiRequirements +import org.luxons.sevenwonders.game.boards.ApiRequirements import org.luxons.sevenwonders.game.cards.CardBack import org.luxons.sevenwonders.game.cards.PlayabilityLevel import org.luxons.sevenwonders.game.resources.ResourceTransactions diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt index 266a57a5..70198f15 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt @@ -18,7 +18,7 @@ import org.luxons.sevenwonders.game.effects.SpecialAbility import org.luxons.sevenwonders.game.moves.Move import org.luxons.sevenwonders.game.moves.resolve import org.luxons.sevenwonders.game.score.ScoreBoard -import org.luxons.sevenwonders.game.api.Table as ApiTable +import org.luxons.sevenwonders.game.api.ApiTable as ApiTable class Game internal constructor( val id: Long, diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt index 5dff8636..1fe3295a 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt @@ -1,6 +1,11 @@ package org.luxons.sevenwonders.game.api import org.luxons.sevenwonders.game.Player +import org.luxons.sevenwonders.game.boards.ApiBoard +import org.luxons.sevenwonders.game.boards.ApiMilitary +import org.luxons.sevenwonders.game.boards.ApiProduction +import org.luxons.sevenwonders.game.boards.ApiRequirements +import org.luxons.sevenwonders.game.boards.ApiScience import org.luxons.sevenwonders.game.boards.Military import org.luxons.sevenwonders.game.boards.Science import org.luxons.sevenwonders.game.boards.ScienceType @@ -8,6 +13,7 @@ import org.luxons.sevenwonders.game.cards.Requirements import org.luxons.sevenwonders.game.cards.TableCard import org.luxons.sevenwonders.game.moves.Move import org.luxons.sevenwonders.game.moves.MoveType +import org.luxons.sevenwonders.game.resources.CountedResource import org.luxons.sevenwonders.game.resources.Production import org.luxons.sevenwonders.game.resources.Resources import org.luxons.sevenwonders.game.wonders.ApiWonder @@ -16,16 +22,17 @@ import org.luxons.sevenwonders.game.boards.Board as InternalBoard import org.luxons.sevenwonders.game.wonders.Wonder as InternalWonder import org.luxons.sevenwonders.game.wonders.WonderStage as InternalWonderStage -internal fun InternalBoard.toApiBoard(player: Player, lastMove: Move?): Board = Board( - playerIndex = playerIndex, - wonder = wonder.toApiWonder(player, lastMove), - production = production.toApiProduction(), - publicProduction = publicProduction.toApiProduction(), - science = science.toApiScience(), - military = military.toApiMilitary(), - playedCards = getPlayedCards().map { it.toTableCard(lastMove) }.toColumns(), - gold = gold -) +internal fun InternalBoard.toApiBoard(player: Player, lastMove: Move?): ApiBoard = + ApiBoard( + playerIndex = playerIndex, + wonder = wonder.toApiWonder(player, lastMove), + production = production.toApiProduction(), + publicProduction = publicProduction.toApiProduction(), + science = science.toApiScience(), + military = military.toApiMilitary(), + playedCards = getPlayedCards().map { it.toTableCard(lastMove) }.toColumns(), + gold = gold + ) internal fun List.toColumns(): List> { val cardsByColor = this.groupBy { it.color } @@ -58,24 +65,26 @@ internal fun InternalWonderStage.toApiWonderStage( builtDuringLastMove = lastMove?.type == MoveType.UPGRADE_WONDER && isLastBuiltStage ) -internal fun Production.toApiProduction(): ApiProduction = ApiProduction( - fixedResources = getFixedResources().toCountedResourcesList(), - alternativeResources = getAlternativeResources() -) +internal fun Production.toApiProduction(): ApiProduction = + ApiProduction( + fixedResources = getFixedResources().toCountedResourcesList(), alternativeResources = getAlternativeResources() + ) -internal fun Requirements.toApiRequirements(): ApiRequirements = ApiRequirements( - gold = gold, - resources = resources.toCountedResourcesList() -) +internal fun Requirements.toApiRequirements(): ApiRequirements = + ApiRequirements( + gold = gold, resources = resources.toCountedResourcesList() + ) -internal fun Resources.toCountedResourcesList(): List = - quantities.map { (type, count) -> ApiCountedResource(count, type) }.sortedBy { it.type } +internal fun Resources.toCountedResourcesList(): List = + quantities.map { (type, count) -> CountedResource(count, type) }.sortedBy { it.type } -internal fun Military.toApiMilitary(): ApiMilitary = ApiMilitary(nbShields, totalPoints, nbDefeatTokens) +internal fun Military.toApiMilitary(): ApiMilitary = + ApiMilitary(nbShields, totalPoints, nbDefeatTokens) -internal fun Science.toApiScience(): ApiScience = ApiScience( - jokers = jokers, - nbWheels = getQuantity(ScienceType.WHEEL), - nbCompasses = getQuantity(ScienceType.COMPASS), - nbTablets = getQuantity(ScienceType.TABLET) -) +internal fun Science.toApiScience(): ApiScience = + ApiScience( + jokers = jokers, + nbWheels = getQuantity(ScienceType.WHEEL), + nbCompasses = getQuantity(ScienceType.COMPASS), + nbTablets = getQuantity(ScienceType.TABLET) + ) diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt index de6e587d..a5f95456 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt @@ -4,7 +4,7 @@ import org.luxons.sevenwonders.game.SimplePlayer import org.luxons.sevenwonders.game.moves.Move import org.luxons.sevenwonders.game.boards.Table as InternalTable -internal fun InternalTable.toApiTable(): Table = Table( +internal fun InternalTable.toApiTable(): ApiTable = ApiTable( boards = boards.mapIndexed { i, b -> b.toApiBoard(SimplePlayer(i, this), lastPlayedMoves.getOrNull(i)) }, currentAge = currentAge, handRotationDirection = handRotationDirection, diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt index 4a3a483c..134240a5 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt @@ -1,7 +1,6 @@ package org.luxons.sevenwonders.game.resources import org.luxons.sevenwonders.game.Player -import org.luxons.sevenwonders.game.api.ApiCountedResource import org.luxons.sevenwonders.game.api.toCountedResourcesList fun Map.toTransactions(): ResourceTransactions = @@ -13,9 +12,9 @@ fun ResourceTransactions.asResources(): Resources = flatMap { it.resources }.asR fun ResourceTransaction.asResources(): Resources = resources.asResources() -fun List.asResources(): Resources = map { it.asResources() }.merge() +fun List.asResources(): Resources = map { it.asResources() }.merge() -fun ApiCountedResource.asResources(): Resources = resourcesOf(type to count) +fun CountedResource.asResources(): Resources = resourcesOf(type to count) internal fun ResourceTransactions.execute(player: Player) = forEach { it.execute(player) } diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt index 0e6eb2b7..07e22a56 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt @@ -3,7 +3,7 @@ package org.luxons.sevenwonders.game.test import org.luxons.sevenwonders.game.Player import org.luxons.sevenwonders.game.PlayerContext import org.luxons.sevenwonders.game.Settings -import org.luxons.sevenwonders.game.api.ApiCountedResource +import org.luxons.sevenwonders.game.resources.CountedResource import org.luxons.sevenwonders.game.api.CustomizableSettings import org.luxons.sevenwonders.game.api.PlayerMove import org.luxons.sevenwonders.game.boards.Board @@ -75,7 +75,7 @@ internal fun createTransactions(provider: Provider, vararg resources: ResourceTy internal fun createTransactions(vararg transactions: ResourceTransaction): ResourceTransactions = transactions.toSet() internal fun createTransaction(provider: Provider, vararg resources: ResourceType): ResourceTransaction = - ResourceTransaction(provider, resources.map { ApiCountedResource(1, it) }) + ResourceTransaction(provider, resources.map { CountedResource(1, it) }) internal fun createRequirements(vararg types: ResourceType): Requirements = Requirements(resources = resourcesOf(*types)) diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt index b37c9c7c..cd9cb732 100644 --- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt +++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt @@ -5,7 +5,7 @@ import org.luxons.sevenwonders.actions.PrepareMoveAction import org.luxons.sevenwonders.api.PlayerDTO import org.luxons.sevenwonders.api.toDTO import org.luxons.sevenwonders.game.Game -import org.luxons.sevenwonders.game.api.Table +import org.luxons.sevenwonders.game.api.ApiTable import org.luxons.sevenwonders.game.cards.CardBack import org.luxons.sevenwonders.lobby.Player import org.luxons.sevenwonders.repositories.PlayerRepository @@ -88,7 +88,7 @@ class GameController @Autowired constructor( } } - private fun sendPlayedMoves(gameId: Long, table: Table) = + private fun sendPlayedMoves(gameId: Long, table: ApiTable) = template.convertAndSend("/topic/game/$gameId/tableUpdates", table) private fun sendPreparedCard(gameId: Long, preparedCard: PreparedCard) = -- cgit