Fixed chess

1. Made sure game ends when checkmate occurs
2. Misc changes