jakesylvestre / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
1 stars 7 forks source link

Wrong castling move through beaten fields. #627

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Wrong castling move:
1. e4 c5 2. d4 cxd4 3. Qxd4 f5 4. e5 Nc6 5. Qe3 d6 6. Nf3 Nxe5 7. Nxe5 dxe5 8. 
Qxe5 Bd7 9. Bb5 a6 10. Bc4 b5 11. Bd5 Qb8 12. Bf4 Qxe5+ 13. Bxe5 O-O-O *

The version: PyChess Staunton 0.10beta3
Installed from apt-get, ubuntu 10.10.

Original issue reported on code.google.com by glo...@gmail.com on 2 Jan 2011 at 9:51

GoogleCodeExporter commented 9 years ago
The move O-O-O is valid here. See:
http://www.fide.com/component/handbook/?id=124&view=article

Original comment by gbtami on 2 Jan 2011 at 10:35

GoogleCodeExporter commented 9 years ago
Please read carefully:

2) Castling is prevented temporarily:
if the square on which the king stands, or the square which it must cross, or 
the square which it is to occupy, is attacked by one or more of the opponent's 
pieces, or
if there is any piece between the king and the rook with which castling is to 
be effected.

Original comment by glo...@gmail.com on 3 Jan 2011 at 12:21

GoogleCodeExporter commented 9 years ago
1. What square is attacked?
the square on which the king stands (e8, no)
the square which it must cross (d8, no)
the square which it is to occupy (c8, no)

2. Are there any piece between the king and the rook? (no)

Original comment by gbtami on 3 Jan 2011 at 7:32