Checkmate

Implemented checkmate and stalemate.