refactor: improve code readability by adjusting formatting and synchronization in GameEngine and tests
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user