From 1c9f247e6fcc3442585b5a0ec8e9c64702da7cf6 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 4 Nov 2026 16:03:06 +0100 Subject: [PATCH] Really TODO this TwoSquareMove ?! --- variants/Fanorona/class.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/variants/Fanorona/class.js b/variants/Fanorona/class.js index d88b5b6..f1f4ba8 100644 --- a/variants/Fanorona/class.js +++ b/variants/Fanorona/class.js @@ -203,10 +203,21 @@ export default class FanoronaRules extends AbstractOnGridRules { const step = [x2 - x1, y2 - y1]; if ( this.canCapture && - ( // TODO........... - this.onBoard(x1 - step[0], y1 - step[1]) && + ( + !this.onBoard(x1 - step[0], y1 - step[1]) || + this.board[x1 - step[0]][y1 - step[1]] == "" + ) + && + ( + !this.onBoard(x1 + step[0], y1 + step[1]) || + this.board[x1 + step[0]][y1 + step[1]] == "" + ) + ) { + return []; + } + // Ok, the move seems valid let moves = []; - +////////// TODO ????????? } atLeastOneCapture() { -- 2.55.0