feat: Add tests for bot behavior including king position, illegal moves, and game events
Build & Test (NowChessSystems) TeamCity build failed

This commit is contained in:
2026-04-16 21:55:55 +02:00
parent 8ecfbd6266
commit 5a66a057b3
2 changed files with 140 additions and 1 deletions
@@ -71,3 +71,9 @@ class GameContextTest extends AnyFunSuite with Matchers:
test("withResult clears result"):
val ctx = GameContext.initial.withResult(Some(GameResult.Win(Color.Black)))
ctx.withResult(None).result shouldBe None
test("kingSquare returns white king position"):
GameContext.initial.kingSquare(Color.White) shouldBe Some(Square(File.E, Rank.R1))
test("kingSquare returns black king position"):
GameContext.initial.kingSquare(Color.Black) shouldBe Some(Square(File.E, Rank.R8))