public void HighlightSlot(int slotIndex) { UISudokuSlot slot = GetUISlot(slotIndex); if (slot == null) { return; } slot.PlayTweenHighlight(); }
private void SlotOnClick(UISudokuSlot slot) { if (slot == null) { return; } if (_onClickAction == null) { return; } _onClickAction(slot); }
private void FillSolutionIntoSlot(int rowIndex, int columnIndex, int value, FillReason reason) { int slotIndex = rowIndex * SudokuUtility.PUZZLE_LENGTH + columnIndex; // Update data _sData.SetSlotValueAndReason(slotIndex, value, reason); UISudokuSlot uiSlot = _uiSlotBoard.GetUISlot(slotIndex); //// Add to undo //if (_undoIndex >= _undoCmdList.Count) { // _undoCmdList.Add(new UndoCommand()); //} //_undoCmdList[_undoIndex].AddNewCommand(uiSlot.Value, uiSlot.FillReason, slotIndex); uiSlot.SetValueAndReason(value, reason); //if (reason != FillReason.QuestionInput) { // AddSolutionLog(rowIndex, columnIndex, value, reason); //} }
public void ButtonSlotOnClick(UISudokuSlot slot) { if (!_isQuizGenerated) { return; } if (!_isResolving) { return; } if (slot == null) { return; } if (slot.FillReason == FillReason.QuestionInput) { return; } if (_selectingInput == null) { return; } int inputValue = _selectingInput.InputValue; if (slot.Value == inputValue) { inputValue = 0; } FillSolutionIntoSlot(slot.SlotIndex, inputValue, FillReason.PlayerInput); //_undoIndex += 1; //RefreshUndoButton(); }
public void ButtonSlotOnClick(UISudokuSlot slot) { if (slot == null) { return; } if (_selectingInput == null) { return; } int inputValue = _selectingInput.InputValue; if (slot.Value == inputValue) { inputValue = 0; } FillSolutionIntoSlot(slot.SlotIndex, inputValue, FillReason.QuestionInput); _undoIndex += 1; Refresh(); }