daveswartz / mateinone

Chess library entirely written in Scala.
Mozilla Public License 2.0
6 stars 0 forks source link

Castle being generated as a move when not valid. #13

Closed daveswartz closed 9 years ago

daveswartz commented 9 years ago

https://gist.github.com/daveswartz/8583d374e94b1a6eefae Bug on black's move 37 (note the castle).

daveswartz commented 9 years ago

The moved set stores the current square of moved pieces and does not include squares of pieces that have not moved. The castling logic checks if the initial position of the King and Rook are in the moved set. This check will will always return false even if the King or Rook have moved.