Rework table
authorTheSaminator <TheSaminator@users.noreply.github.com>
Tue, 7 Jun 2022 19:17:18 +0000 (15:17 -0400)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Tue, 7 Jun 2022 19:17:18 +0000 (15:17 -0400)
src/jvmMain/kotlin/starshipfights/game/game_start_jvm.kt
src/jvmMain/kotlin/starshipfights/game/server_game.kt
src/jvmMain/kotlin/starshipfights/info/views_user.kt

index 921f752201e093b4c9f9d27744932931ce53915d..ee618551ef1b60e2aaceab1537ce0405b0450aa1 100644 (file)
@@ -49,7 +49,7 @@ suspend fun generateTrainingInitialState(playerInfo: InGameAdmiral, enemyFaction
        val aiAdmiral = genAI(enemyFaction, battleInfo.size)
        
        return GameState(
-               GameStart(
+               start = GameStart(
                        battleWidth, battleLength,
                        
                        PlayerStart(
@@ -71,8 +71,8 @@ suspend fun generateTrainingInitialState(playerInfo: InGameAdmiral, enemyFaction
                                        .filterValues { it.shipType.weightClass.tier <= battleInfo.size.maxWeightClass.tier }
                        )
                ),
-               playerInfo,
-               InGameAdmiral(
+               hostInfo = playerInfo,
+               guestInfo = InGameAdmiral(
                        id = aiAdmiral.id.reinterpret(),
                        user = InGameUser(
                                id = aiAdmiral.owningUser.reinterpret(),
@@ -83,6 +83,6 @@ suspend fun generateTrainingInitialState(playerInfo: InGameAdmiral, enemyFaction
                        faction = aiAdmiral.faction,
                        rank = aiAdmiral.rank
                ),
-               battleInfo
+               battleInfo = battleInfo
        )
 }
index 9d651c77cb918104c62e2b8ea88a9fed6f3b1f15..ff96b3f5be6ae83811c86b4d0a174bf0edec2bf5 100644 (file)
@@ -29,8 +29,10 @@ object GameManager {
        
        suspend fun initGame(hostInfo: InGameAdmiral, guestInfo: InGameAdmiral, battleInfo: BattleInfo): GameToken {
                val gameState = GameState(
-                       generateGameStart(hostInfo, guestInfo, battleInfo),
-                       hostInfo, guestInfo, battleInfo
+                       start = generateGameStart(hostInfo, guestInfo, battleInfo),
+                       hostInfo = hostInfo,
+                       guestInfo = guestInfo,
+                       battleInfo = battleInfo
                )
                
                val session = GameSession(gameState)
index 1f6c565b3170f8aee09c792218cf76149ddb0b29..d943a4b1b9cff7d1c4c8c85a5705a768b11906cc 100644 (file)
@@ -540,7 +540,7 @@ suspend fun ApplicationCall.admiralPage(): HTML.() -> Unit {
                                        }
                                }
                        }
-                       
+                       h2 { +"Lost Ships' Memorial" }
                        p {
                                +"The following ships were lost under "
                                +(if (admiral.isFemale) "her" else "his")
@@ -550,7 +550,7 @@ suspend fun ApplicationCall.admiralPage(): HTML.() -> Unit {
                                tr {
                                        th { +"Ship Name" }
                                        th { +"Ship Class" }
-                                       th { +"Destruction" }
+                                       th { +Entities.nbsp }
                                }
                                
                                for (ship in graveyard.sortedBy { it.name }.sortedBy { it.shipType.weightClass.tier }) {