Skip to content

Commit

Permalink
fix: switch turn after a move
Browse files Browse the repository at this point in the history
  • Loading branch information
jahrim committed Feb 27, 2023
1 parent 9cb5a86 commit 04fffb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chess/src/main/scala/io/github/chess/model/ChessGame.scala
Expand Up @@ -161,7 +161,7 @@ class ChessGame(private val vertx: Vertx) extends ChessPort:
)

private def switchTurn(): Unit =
this.state.changeTeam()
this.state = this.state.changeTeam()
if this.state.gameConfiguration.timeConstraint == TimeConstraint.MoveLimit then
this.timer.restart()

Expand Down

0 comments on commit 04fffb8

Please sign in to comment.