mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 02:48:40 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bd859c2eb |
@@ -778,6 +778,12 @@ class GamesManager(
|
||||
token: Long
|
||||
): Unit =
|
||||
this.synchronized {
|
||||
// Lazy load: ensure game is in memory before processing command
|
||||
// This handles the case where a command arrives before subscription after reconnect
|
||||
EagleRequire.clientRequire(
|
||||
ensureGameLoaded(gameId),
|
||||
s"No game found with ID ${gameId.toHexString}"
|
||||
)
|
||||
val _ = synchronizedHandlePostResults(
|
||||
gameControllerInfos(gameId).controller
|
||||
.postHumanCommand(
|
||||
@@ -802,6 +808,11 @@ class GamesManager(
|
||||
index: Int,
|
||||
roll: Option[Int]
|
||||
): Unit = this.synchronized {
|
||||
// Lazy load: ensure game is in memory before processing command
|
||||
EagleRequire.clientRequire(
|
||||
ensureGameLoaded(eagleGameId),
|
||||
s"No game found with ID ${eagleGameId.toHexString}"
|
||||
)
|
||||
// FIXME: need to verify username match
|
||||
SimpleTimedLogger
|
||||
.fileLogger(eagleGameId, "timings")
|
||||
@@ -831,6 +842,11 @@ class GamesManager(
|
||||
placementCommands: Vector[ShardokPlacementCommand],
|
||||
shardokToken: Long
|
||||
): Unit = this.synchronized {
|
||||
// Lazy load: ensure game is in memory before processing command
|
||||
EagleRequire.clientRequire(
|
||||
ensureGameLoaded(eagleGameId),
|
||||
s"No game found with ID ${eagleGameId.toHexString}"
|
||||
)
|
||||
// FIXME: need to verify username match
|
||||
shardokClient.postPlacementCommands(
|
||||
eagleGameId = eagleGameId,
|
||||
|
||||
Reference in New Issue
Block a user