private void MoveChess(int x, int y) { if (allowedMove[x, y])//teraz dostępne tylko allowed ruchy { //usuwanie obiektów Chessman c = Chessmans[x, y]; if (c != null && c.ifWhite != whiteTurn) { activeChessman.Remove(c.gameObject); Destroy(c.gameObject); if (c.GetType() == typeof(King)) { EndGame(); return; } } Chessmans [selected.CurrentX, selected.CurrentY] = null; selected.transform.position = GetCenter(x, y); selected.Position(x, y); Chessmans[x, y] = selected; whiteTurn = !whiteTurn; } BoardProcessing.Instance.ProcessHide(); selected = null; //zmiana kolejki ruch_biały -> ruch czarny LOOP }