Board class
A Sudoku puzzle Board.
Constructors
- Board()
- Board.clone(Board other)
-
Board.from(List<
List< values)int> >
Properties
-
blankPositions
→ List<
({int col, int row})> -
Returns a list with the blank positions of the board (positions with
value 0).
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
-
invalidPositions
→ List<
({int col, int row})> -
Returns a list with the invalid positions of the board.
no setter
- isComplete → bool
-
Returns true if the Sudoku board is complete (valid without any blank position)
no setter
- isEmpty → bool
-
Returns true if the board is empty (all its positions have value 0).
no setter
- isValid → bool
-
Returns true if the board is valid (synonym for "has no invalid position").
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clears the board.
-
getAt(
{required int row, required int col}) → int -
Returns the
valueat the specifiedrowandcolon the Sudoku board. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
possibleValuesAt(
{required int row, required int col}) → Set< int> -
Returns the set of possible values that can be placed at the specified
position of the Board.
If the
roworcolis out of range, a RangeError is thrown. -
setAt(
{required int row, required int col, required int value}) → void - Sets the value at the specified row and column on the Sudoku board.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override