1 import ChessRules
from "/base_rules.js";
3 export default class TeleportRules
extends ChessRules
{
7 select: C
.Options
.select
,
8 input: C
.Options
.input
.concat({
9 label: "Teleport king",
14 styles: C
.Options
.styles
.filter(s
=> s
!= "teleport")
19 o
.options
["teleport"] = true;
23 canSelfTake([x1
, y1
], [x2
, y2
]) {
24 return (this.options
["tpking"] || !this.isKing(x2
, y2
));