Fix typo in Chakart getComputerMove()
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 2 May 2020 23:39:26 +0000 (01:39 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 2 May 2020 23:39:26 +0000 (01:39 +0200)
client/src/variants/Chakart.js

index 8f84b37..bfbca52 100644 (file)
@@ -1358,7 +1358,7 @@ export class ChakartRules extends ChessRules {
       // Play a deterministic one: capture king or material if possible
       return super.getComputerMove(deterministicMoves);
     // Play a random effect move, at random:
-    let move1 = randomMoves[randInt(moves.length)];
+    let move1 = randomMoves[randInt(randomMoves.length)];
     this.play(move1);
     let move2 = undefined;
     if (this.subTurn == 2) {