src/chess/rules.c

changeset 165
3e27c99ed721
parent 164
c19d8523b31c
child 166
1a9b662bc201
equal deleted inserted replaced
164:c19d8523b31c 165:3e27c99ed721
693 candidates[ccount].fromrow = r; 693 candidates[ccount].fromrow = r;
694 candidates[ccount].fromfile = f; 694 candidates[ccount].fromfile = f;
695 candidates[ccount].torow = row; 695 candidates[ccount].torow = row;
696 candidates[ccount].tofile = file; 696 candidates[ccount].tofile = file;
697 candidates[ccount].capture = true; 697 candidates[ccount].capture = true;
698 if (piece_type(p) == PAWN && (row == 0 || row == 7)) {
699 /* the exact piece for promotion does not matter */
700 candidates[ccount].promotion = mkpiece(QUEEN, color);
701 }
698 ccount++; 702 ccount++;
699 } 703 }
700 } 704 }
701 } 705 }
702 706

mercurial