+ getCurrentScore()
+ {
+ const color = this.turn;
+ const kp = this.kingPos[color];
+ if (kp[0] < 0) //king disappeared
+ return (color == "w" ? "0-1" : "1-0");
+ if (this.atLeastOneMove()) // game not over
+ return "*";
+ return "1/2"; //no moves but kings still there (seems impossible)