Add Makpong, Hoppelpoppel, and Jangqi (rules unwritten yet)
[vchess.git] / client / src / variants / Makpong.js
1 import { MakrukRules } from "@/variants/Makruk";
2
3 export class MakpongRules extends MakrukRules {
4
5 filterValid(moves) {
6 const color = this.turn;
7 if (this.underCheck(color)) {
8 // Filter out all moves involving king
9 return super.filterValid(moves.filter(m => m.vanish[0].p != V.KING));
10 }
11 return super.filterValid(moves);
12 }
13
14 };