Check and checkmate are done. Email me if there are any bugs/logical errors