Subversion Repositories Games.Chess Giants

Rev

Rev 154 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 154 Rev 156
Line 76... Line 76...
76
    for (piece = pawn; piece <= king; piece++)
76
    for (piece = pawn; piece <= king; piece++)
77
      if ((temp = Pieces(wtm, piece) & attacks))
77
      if ((temp = Pieces(wtm, piece) & attacks))
78
        break;
78
        break;
79
    if (piece > king)
79
    if (piece > king)
80
      break;
80
      break;
81
    toccupied ^= (temp & -temp);
81
    toccupied ^= (temp & (0-temp)); // Pierre-Marie Baty -- signedness fix
82
    if (piece & 1)
82
    if (piece & 1)
83
      attacks |= BishopAttacks(target, toccupied) & bsliders;
83
      attacks |= BishopAttacks(target, toccupied) & bsliders;
84
    if (piece != king && piece & 4)
84
    if (piece != king && piece & 4)
85
      attacks |= RookAttacks(target, toccupied) & rsliders;
85
      attacks |= RookAttacks(target, toccupied) & rsliders;
86
    see_list[nc] = -see_list[nc - 1] + attacked_piece;
86
    see_list[nc] = -see_list[nc - 1] + attacked_piece;
Line 147... Line 147...
147
  for (piece = pawn; piece <= king; piece++)
147
  for (piece = pawn; piece <= king; piece++)
148
    if ((temp = Pieces(wtm, piece) & attacks))
148
    if ((temp = Pieces(wtm, piece) & attacks))
149
      break;
149
      break;
150
  if (piece > king)
150
  if (piece > king)
151
    return 0;
151
    return 0;
152
  toccupied ^= (temp & -temp);
152
  toccupied ^= (temp & (0-temp)); // Pierre-Marie Baty -- signedness fix
153
  if (piece & 1)
153
  if (piece & 1)
154
    attacks |= BishopAttacks(target, toccupied) & bsliders;
154
    attacks |= BishopAttacks(target, toccupied) & bsliders;
155
  if (piece != king && piece & 4)
155
  if (piece != king && piece & 4)
156
    attacks |= RookAttacks(target, toccupied) & rsliders;
156
    attacks |= RookAttacks(target, toccupied) & rsliders;
157
  attacked_piece = pcval[piece];
157
  attacked_piece = pcval[piece];
Line 175... Line 175...
175
    for (piece = pawn; piece <= king; piece++)
175
    for (piece = pawn; piece <= king; piece++)
176
      if ((temp = Pieces(wtm, piece) & attacks))
176
      if ((temp = Pieces(wtm, piece) & attacks))
177
        break;
177
        break;
178
    if (piece > king)
178
    if (piece > king)
179
      break;
179
      break;
180
    toccupied ^= (temp & -temp);
180
    toccupied ^= (temp & (0-temp)); // Pierre-Marie Baty -- signedness fix
181
    if (piece & 1)
181
    if (piece & 1)
182
      attacks |= BishopAttacks(target, toccupied) & bsliders;
182
      attacks |= BishopAttacks(target, toccupied) & bsliders;
183
    if (piece != king && piece & 4)
183
    if (piece != king && piece & 4)
184
      attacks |= RookAttacks(target, toccupied) & rsliders;
184
      attacks |= RookAttacks(target, toccupied) & rsliders;
185
    see_list[nc] = -see_list[nc - 1] + attacked_piece;
185
    see_list[nc] = -see_list[nc - 1] + attacked_piece;