added checkmate logic, however still need tests for it