From 6b672d9325f32a94e936995509c54be3d69e21da Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 16 Jan 2013 06:44:28 +0000 Subject: [PATCH] Enfoced taking turns. --- xtrn/chess/pieces.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xtrn/chess/pieces.js b/xtrn/chess/pieces.js index 9347f81825..116255bcc8 100644 --- a/xtrn/chess/pieces.js +++ b/xtrn/chess/pieces.js @@ -21,6 +21,14 @@ Piece.prototype={ return false; if(brd.check(this.colour)) return false; + if(this.board.movenum % 1) { + if(this.colour == COLOUR.white) + return false; + } + else { + if(this.colour == COLOUR.black) + return false; + } if(update) return this.board._domove(this, tgtpos); }, -- GitLab