refactor(rule): Currying
Build & Test (NowChessSystems) TeamCity build finished

Added Currying
This commit is contained in:
LQ63
2026-04-06 16:06:58 +02:00
parent 638139602c
commit 152411f27e
9 changed files with 59 additions and 59 deletions
@@ -178,7 +178,7 @@ class ChessBoardView(val stage: Stage, private val engine: GameEngine) extends B
selectedSquare = Some(clickedSquare)
highlightSquare(rank, file, PieceSprites.SquareColors.Selected)
val legalDests = engine.ruleSet.legalMoves(engine.context, clickedSquare)
val legalDests = engine.ruleSet.legalMoves(engine.context)(clickedSquare)
.collect { case move if move.from == clickedSquare => move.to }
legalDests.foreach { sq =>
highlightSquare(sq.rank.ordinal, sq.file.ordinal, PieceSprites.SquareColors.ValidMove)