feat: implement clock expiry scanning and handling for game records
This commit is contained in:
+1
-2
@@ -42,8 +42,7 @@ class GameRecordRepository:
|
|||||||
.asScala
|
.asScala
|
||||||
.toList
|
.toList
|
||||||
.filter { g =>
|
.filter { g =>
|
||||||
val remaining =
|
val remaining = if g.clockActiveColor == "white" then g.whiteRemainingMs.longValue else g.blackRemainingMs.longValue
|
||||||
if g.clockActiveColor == "white" then g.whiteRemainingMs.longValue else g.blackRemainingMs.longValue
|
|
||||||
g.clockLastTickAt.longValue + remaining < nowMs
|
g.clockLastTickAt.longValue + remaining < nowMs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user