refactor: improve code readability by adjusting formatting and synchronization in GameEngine and tests

This commit is contained in:
2026-04-20 22:24:52 +02:00
committed by Janis
parent c567aacf56
commit 5fafd94ea8
4 changed files with 31 additions and 32 deletions
@@ -194,8 +194,7 @@ class GameEngine(
currentContext = currentContext.withResult(Some(GameResult.Draw(DrawReason.ThreefoldRepetition)))
invoker.clear()
notifyObservers(DrawEvent(currentContext, DrawReason.ThreefoldRepetition))
else
notifyObservers(InvalidMoveEvent(currentContext, InvalidMoveReason.DrawCannotBeClaimed))
else notifyObservers(InvalidMoveEvent(currentContext, InvalidMoveReason.DrawCannotBeClaimed))
}
/** Load a game using the provided importer. If the imported context has moves, they are replayed through the command
@@ -4,7 +4,7 @@ import de.nowchess.api.player.{PlayerId, PlayerInfo}
import de.nowchess.chess.engine.GameEngine
import io.quarkus.test.junit.QuarkusTest
import jakarta.inject.Inject
import org.junit.jupiter.api.{Test, DisplayName}
import org.junit.jupiter.api.{DisplayName, Test}
import org.junit.jupiter.api.Assertions.*
import scala.compiletime.uninitialized
@@ -4,7 +4,7 @@ import de.nowchess.api.dto.*
import de.nowchess.chess.exception.BadRequestException
import io.quarkus.test.junit.QuarkusTest
import jakarta.inject.Inject
import org.junit.jupiter.api.{Test, DisplayName}
import org.junit.jupiter.api.{DisplayName, Test}
import org.junit.jupiter.api.Assertions.*
import scala.compiletime.uninitialized