Skip to content

Commit

Permalink
If not racing kings, just change the orientation instead of flipping.
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Nov 8, 2024
1 parent 486b329 commit 6fa9f1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ui/analyse/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,12 @@ export default class AnalyseCtrl {
};

flip = () => {
this.flipped = !this.flipped;
this.study?.onFlip();
if (this.data.game.variant.key === 'racingKings') {
this.flipped = !this.flipped;
this.study?.onFlip();
} else {
this.data.orientation = opposite(this.data.orientation);
}
this.chessground?.set({
orientation: this.bottomColor(),
});
Expand Down

0 comments on commit 6fa9f1d

Please sign in to comment.