pioz / chess

A fast chess library that use bitboards to play chess with Ruby
GNU Lesser General Public License v3.0
59 stars 17 forks source link

fixed fen load winner check #9

Closed alexggordon closed 9 years ago

alexggordon commented 9 years ago

Hey, so in further retrospect, it looks that when loading a FEN, the winner of the game is the opposite of the boards active color.

For example, the test case:

rnb1kbnr/pppp1ppp/4p3/8/5PPq/8/PPPPP2P/RNBQKBNR w KQkq - 1 3

The active color is w, but the winner is actually black. You can see the game here. Let me know if you see anything wrong with this!

pioz commented 9 years ago

@alexggordon Ok, I've merged your pull request, can you check if now works? You can use the master branch.

alexggordon commented 9 years ago

All set! Tested a couple different FEN's. Sorry about the bad test on this original issue!