test: add coverage for all completePromotion branches (Moved, Checkmate, Stalemate)
This commit is contained in:
@@ -137,7 +137,7 @@ class GameEnginePromotionTest extends AnyFunSuite with Matchers:
|
|||||||
// Black pawn e2, white king h3 (not on rank 1 or file e), black king a8
|
// Black pawn e2, white king h3 (not on rank 1 or file e), black king a8
|
||||||
// e2->e1=Q: queen on e1 does not attack h3 -> normal Moved
|
// e2->e1=Q: queen on e1 does not attack h3 -> normal Moved
|
||||||
val board = FenParser.parseBoard("k7/8/8/8/8/7K/4p3/8").get
|
val board = FenParser.parseBoard("k7/8/8/8/8/7K/4p3/8").get
|
||||||
val engine = new GameEngine(initialBoard = board)
|
val engine = new GameEngine(initialBoard = board, initialTurn = Color.Black)
|
||||||
val events = captureEvents(engine)
|
val events = captureEvents(engine)
|
||||||
|
|
||||||
engine.processUserInput("e2e1")
|
engine.processUserInput("e2e1")
|
||||||
|
|||||||
Reference in New Issue
Block a user