Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ross39 committed Dec 19, 2023
1 parent 27900f3 commit c258df6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/analyse/src/practice/practiceCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { defined, prop, Prop } from 'common';
import { altCastles } from 'chess';
import { parseUci } from 'chessops/util';
import { makeSan } from 'chessops/san';
import { colors } from 'chessground/types';

declare type Verdict = 'goodMove' | 'inaccuracy' | 'mistake' | 'blunder';

Expand Down Expand Up @@ -134,6 +135,10 @@ export function make(root: AnalyseCtrl, playableDepth: () => number): PracticeCt
}

function isMyTurn(): boolean {
if ((root.data.game.variant.key === 'racingKings') && (root.data.game.player === 'black')) {
return root.turnColor() !== root.bottomColor();
}
console.log("computer plays black");
return root.turnColor() === root.bottomColor();
}

Expand Down

0 comments on commit c258df6

Please sign in to comment.