Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (seeContents(this.xpos, this.ypos + 1) === 0) {
- wazirFerzCheck(this.xpos + 1, this.ypos + 2, 0, legalMoves);
- wazirFerzCheck(this.xpos - 1, this.ypos + 2, 0, legalMoves);
- wazirFerzCheck(this.xpos + 1, this.ypos + 2, enemy, legalMoves);
- wazirFerzCheck(this.xpos - 1, this.ypos + 2, enemy, legalMoves);
- }
- // South
- if (seeContents(this.xpos, this.ypos - 1) === 0) {
- wazirFerzCheck(this.xpos + 1, this.ypos - 2, 0, legalMoves);
- wazirFerzCheck(this.xpos - 1, this.ypos - 2, 0, legalMoves);
- wazirFerzCheck(this.xpos + 1, this.ypos - 2, enemy, legalMoves);
- wazirFerzCheck(this.xpos - 1, this.ypos - 2, enemy, legalMoves);
- }
- // East
- if (seeContents(this.xpos + 1, this.ypos) === 0) {
- wazirFerzCheck(this.xpos + 2, this.ypos + 1, 0, legalMoves);
- wazirFerzCheck(this.xpos + 2, this.ypos - 1, 0, legalMoves);
- wazirFerzCheck(this.xpos + 2, this.ypos + 1, enemy, legalMoves);
- wazirFerzCheck(this.xpos + 2, this.ypos - 1, enemy, legalMoves);
- }
- // West
- if (seeContents(this.xpos - 1, this.ypos) === 0) {
- wazirFerzCheck(this.xpos - 2, this.ypos + 1, 0, legalMoves);
- wazirFerzCheck(this.xpos - 2, this.ypos - 1, 0, legalMoves);
- wazirFerzCheck(this.xpos - 2, this.ypos + 1, enemy, legalMoves);
- wazirFerzCheck(this.xpos - 2, this.ypos - 1, enemy, legalMoves);
- }
Advertisement
Add Comment
Please, Sign In to add comment