Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Dec 14, 2023
1 parent 1baf369 commit 03d7bd6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/Room.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Room(
var needWin: Int = 0 // 需要赢几局才算赢
var cdTime = 30
val changeCardCount = intArrayOf(0, 0)
val lastGetTime = longArrayOf(0, 0) // 上次收卡时间
val lastGetTime = longArrayOf(0, 0) // 从游戏开始到上次收卡经过的毫秒数,去掉暂停时间
var totalPauseMs: Long = 0 // 累计暂停时长,毫秒
var pauseBeginMs: Long = 0 // 开始暂停时刻,毫秒,0表示没暂停
var pauseEndMs: Long = 0 // 上一次结束暂停的时刻,毫秒,0表示从未暂停过
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/message/GetSpellsCs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class GetSpellsCs : Handler {
if (player.roomId.isNullOrEmpty()) throw HandlerException("不在房间里")
val room = Store.getRoom(player.roomId) ?: throw HandlerException("找不到房间")
if (!room.started) throw HandlerException("游戏还未开始")
val now = System.currentTimeMillis()
ctx.writeMessage(
Message(
reply = protoName,
Expand Down

0 comments on commit 03d7bd6

Please sign in to comment.