/
Binom
/
SudokuSolverAlise
Обзор
Документация
Войти
/
Binom
/
SudokuSolverAlise
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Cell.java
30 строк
1 KB
Binom
upload files
23 ноя 2025, 12:16
23 ноя 2025, 12:16
a87f9bf
Код
Авторство
О чём код?
package org.example; import java.util.ArrayList; public class Cell { private int value; // текущее значение (0 если не заполнено) private final int row; // строка (0–8) private final int col; // столбец (0–8) private ArrayList<Integer> possibleValues; // возможные значения (если value == 0) private boolean isFixed; // фиксированная ли ячейка (изначально задана) // Конструктор public Cell(int row, int col, int value) { this.row = row; this.col = col; this.value = value; this.isFixed = (value != 0); this.possibleValues = new ArrayList<>(); } // Геттеры и сеттеры public int getRow() { return row; } public int getCol() { return col; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } public void setFixed(boolean fixed) { this.isFixed = fixed; } public boolean isFixed() { return isFixed; } public ArrayList<Integer> getPossibleValues() { return possibleValues; } public void setPossibleValues(ArrayList<Integer> values) { this.possibleValues = values; } }