fix stalemate checking
Merge pull request #8 from vitosamson/master

fix stalemate checking