Isoraqathedh

g[WF]

Jan 27th, 2012
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (seeContents(this.xpos, this.ypos + 1) === 0) {
  2.     wazirFerzCheck(this.xpos + 1, this.ypos + 2, 0, legalMoves);
  3.     wazirFerzCheck(this.xpos - 1, this.ypos + 2, 0, legalMoves);
  4.     wazirFerzCheck(this.xpos + 1, this.ypos + 2, enemy, legalMoves);
  5.     wazirFerzCheck(this.xpos - 1, this.ypos + 2, enemy, legalMoves);
  6. }
  7. // South
  8. if (seeContents(this.xpos, this.ypos - 1) === 0) {
  9.     wazirFerzCheck(this.xpos + 1, this.ypos - 2, 0, legalMoves);
  10.     wazirFerzCheck(this.xpos - 1, this.ypos - 2, 0, legalMoves);
  11.     wazirFerzCheck(this.xpos + 1, this.ypos - 2, enemy, legalMoves);
  12.     wazirFerzCheck(this.xpos - 1, this.ypos - 2, enemy, legalMoves);
  13. }
  14. // East
  15. if (seeContents(this.xpos + 1, this.ypos) === 0) {
  16.     wazirFerzCheck(this.xpos + 2, this.ypos + 1, 0, legalMoves);
  17.     wazirFerzCheck(this.xpos + 2, this.ypos - 1, 0, legalMoves);
  18.     wazirFerzCheck(this.xpos + 2, this.ypos + 1, enemy, legalMoves);
  19.     wazirFerzCheck(this.xpos + 2, this.ypos - 1, enemy, legalMoves);
  20. }
  21. // West
  22. if (seeContents(this.xpos - 1, this.ypos) === 0) {
  23.     wazirFerzCheck(this.xpos - 2, this.ypos + 1, 0, legalMoves);
  24.     wazirFerzCheck(this.xpos - 2, this.ypos - 1, 0, legalMoves);
  25.     wazirFerzCheck(this.xpos - 2, this.ypos + 1, enemy, legalMoves);
  26.     wazirFerzCheck(this.xpos - 2, this.ypos - 1, enemy, legalMoves);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment