public virtual void land_piece_set() { GameManager.instance.get_white_moves(); GameManager.instance.get_black_moves(); GameManager.instance.check_game_end(); if (GameManager.instance.black_is_in_check()) { Moves_Box.force_print("Black is in check!"); } if (GameManager.instance.white_is_in_check()) { Moves_Box.force_print("White is in check!"); } }
public void check_game_end() { if ((white_moves.Count == 0 && !white_is_in_check()) || (black_moves.Count == 0 && !black_is_in_check())) { Moves_Box.force_print("Stalemate!"); StartCoroutine("quitGame"); } if ((white_moves.Count == 0 && white_is_in_check()) || !pieceLocation.ContainsValue(wking_location)) { Moves_Box.force_print("Black Victory!"); StartCoroutine("quitGame"); } if ((black_moves.Count == 0 && black_is_in_check()) || !pieceLocation.ContainsValue(bking_location)) { Moves_Box.force_print("White Victory!"); StartCoroutine("quitGame"); } }