Implemented Checkmate checking - it prints "Checkmate" to stdin