Skip to content

Commit

Permalink
Merge pull request #15709 from lenguyenthanh/scalachess-16.1.0
Browse files Browse the repository at this point in the history
Scalachess 16.1.0
  • Loading branch information
ornicar committed Jul 13, 2024
2 parents 87a858f + 55e8882 commit 23ba0b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions modules/game/src/main/Event.scala
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ object Event:
threefold = situation.threefoldRepetition,
promotion = move.promotion.map { Promotion(_, move.dest) },
enpassant = move.capture.ifTrue(move.enpassant).map(Event.Enpassant(_, !move.color)),
castle = move.castle.map(_.value).map((king, rook) => Castling(king, rook, move.color)),
castle = move.castle.map(Castling(_, move.color)),
state = state,
clock = clock,
possibleMoves = situation.destinations,
Expand Down Expand Up @@ -182,12 +182,13 @@ object Event:
"color" -> color
)

case class Castling(king: (Square, Square), rook: (Square, Square), color: Color) extends Event:
case class Castling(castle: ChessMove.Castle, color: Color) extends Event:
def typ = "castling"
def data =
import castle.*
Json.obj(
"king" -> Json.arr(king._1.key, king._2.key),
"rook" -> Json.arr(rook._1.key, rook._2.key),
"king" -> Json.arr(king.key, kingTo.key),
"rook" -> Json.arr(rook.key, rookTo.key),
"color" -> color
)

Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object Dependencies {
}

object chess {
val version = "16.0.9"
val version = "16.1.0"
val core = "org.lichess" %% "scalachess" % version
val testKit = "org.lichess" %% "scalachess-test-kit" % version % Test
val playJson = "org.lichess" %% "scalachess-play-json" % version
Expand Down

0 comments on commit 23ba0b5

Please sign in to comment.