Skip to content

Commit

Permalink
Merge pull request lichess-org#16339 from phihag/automatic-orientatio…
Browse files Browse the repository at this point in the history
…n-for-puzzles-in-study

Automatic orientation for puzzles in studies
  • Loading branch information
ornicar authored Nov 5, 2024
2 parents c0fb55c + 69e0979 commit 4d69bad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/study/src/main/ChapterMaker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ final private class ChapterMaker(
case Orientation.Fixed(color) => color
case _ if isMe(tags.names.white) => Color.white
case _ if isMe(tags.names.black) => Color.black
// If it is a concealed chapter (puzzles from a coach/book/course), start from side which moves first
case _ if data.isConceal && !data.fen.isDefined => root.color
// if an outcome is known, then it's a finished game, which we show from white perspective by convention
case _ if tags.outcome.isDefined => Color.white
// in gamebooks (interactive chapter), we guess the orientation based on the last node
Expand Down

0 comments on commit 4d69bad

Please sign in to comment.