X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FBicolour%2Fclass.js;h=3812d4cc62e475f499e3b06003e03d0bc5eabd8e;hb=9aebe2aac02158a4f1c92ad0ac529f8ed245602e;hp=fd2cdb0331ea6e50d079fc37a9247f5cf75e6b74;hpb=33b427488bb6ee5c505c3a024bccedbef763f80e;p=xogo.git diff --git a/variants/Bicolour/class.js b/variants/Bicolour/class.js index fd2cdb0..3812d4c 100644 --- a/variants/Bicolour/class.js +++ b/variants/Bicolour/class.js @@ -2,9 +2,7 @@ import ChessRules from "/base_rules.js"; import {Random} from "/utils/alea.js"; import {ArrayFun} from "/utils/array.js"; -export class BicolourRules extends ChessRules { - - // TODO: Options +export default class BicolourRules extends ChessRules { get hasFlags() { return false; @@ -103,9 +101,11 @@ export class BicolourRules extends ChessRules { }; } - underCheck(color) { - const kingPos = this.searchKingPos(color)[0], - return (this.underAttack(kingPos, 'w') || this.underAttack(kingPos, 'b')); + underCheck(square_s) { + return ( + this.underAttack(square_s[0], 'w') || + this.underAttack(square_s[0], 'b') + ); } };