this.oppConnected = true;
this.mycolor = color;
this.seek = false;
+ this.mode = "human";
if (!!moves && moves.length > 0) //imply continuation
{
const lastMove = moves[moves.length-1];
}
else //against computer
{
+ this.mode = "computer";
this.mycolor = Math.random() < 0.5 ? 'w' : 'b';
if (this.mycolor == 'b')
setTimeout(this.playComputerMove, 500);