checkmate and prevent move into check working