private void ProcessCheckmate(int x, int y) { bool[,] allowedMoves = Chessmans[x, y].PossibleMove(); if (IsCheckmate(allowedMoves)) { Chessman kingPos = GetKingPos(!isWhiteTurn); BoardHighlights.Instance.ShowCheckedHighlight(new Vector3(kingPos.CurrentX + 0.5f, 0, kingPos.CurrentY + 0.5f)); selectedChessman.ShowPowerEffect(); chessMate = selectedChessman; OnChecked(); //if (isWhiteTurn) // Debug.Log("Black team is checkmated"); //else // Debug.Log("White team is checkmated"); } }