diff --git a/ui/analyse/src/ctrl.ts b/ui/analyse/src/ctrl.ts index d8b05638e48d..e0c2c2c01a48 100644 --- a/ui/analyse/src/ctrl.ts +++ b/ui/analyse/src/ctrl.ts @@ -277,6 +277,10 @@ export default class AnalyseCtrl { return opposite(this.bottomColor()); } + playerColor(): Color { + return this.flipped ? opposite(this.data.game.player) : this.data.game.player; + } + bottomColor(): Color { if (this.data.game.variant.key === 'racingKings') return this.flipped ? 'black' : 'white'; return this.flipped ? opposite(this.data.orientation) : this.data.orientation; diff --git a/ui/analyse/src/practice/practiceCtrl.ts b/ui/analyse/src/practice/practiceCtrl.ts index 12d401b37deb..b91edef8ca30 100644 --- a/ui/analyse/src/practice/practiceCtrl.ts +++ b/ui/analyse/src/practice/practiceCtrl.ts @@ -136,7 +136,10 @@ export function make(root: AnalyseCtrl, playableDepth: () => number): PracticeCt } function isMyTurn(): boolean { - return root.turnColor() === root.bottomColor(); + return ( + root.turnColor() === + (root.data.game.variant.key === 'racingKings' ? root.playerColor() : root.bottomColor()) + ); } function checkCeval() {