Skip to content

Commit

Permalink
Merge branch 'master' into modules/gathering
Browse files Browse the repository at this point in the history
* master:
  Update scala3-library to 3.3.0-RC5
  Add ratingDiff to /api/stream/event
  • Loading branch information
ornicar committed Apr 28, 2023
2 parents 974f101 + b831c36 commit 4a91e7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/game/src/main/JsonView.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ final class JsonView(rematches: Rematches):
.playerTextBlocking(pov.opponent, withRating = false)
)
.add("rating" -> pov.opponent.rating)
.add("ratingDiff" -> pov.opponent.ratingDiff)
.add("ai" -> pov.opponent.aiLevel),
"isMyTurn" -> pov.isMyTurn
)
Expand All @@ -73,6 +74,7 @@ final class JsonView(rematches: Rematches):
.add("swissId" -> pov.game.swissId)
.add("orientation" -> pov.game.variant.racingKings.option(chess.White))
.add("winner" -> pov.game.winnerColor)
.add("ratingDiff" -> pov.player.ratingDiff)

def player(p: Player, user: Option[LightUser]) =
Json
Expand Down

0 comments on commit 4a91e7a

Please sign in to comment.