private void UpdateButtons(bool row, int index, bool bigArrow) { if (CompareWith(backupBoard)) { hasShifted = false; EnableArrows?.Invoke(); } else { hasShifted = true; UpdateArrowsState?.Invoke(row, index, bigArrow); } }
/// <summary> /// Sets the board and all the squares to empty /// </summary> public void CleanBoard() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { board[i, j] = Marks.Empty; backupBoard[i, j] = Marks.Empty; squares[i, j].Set(Marks.Empty); } } emptySquares = 16; SelectFirstPlayer(); EnableArrows?.Invoke(); OnEndGame?.Invoke(); hasShifted = false; isInGame = true; winGamePanel.gameObject.SetActive(false); }