Grid class

Container for holding 9x9 cell matrix For an example of what a 9x9 grid looks like, see Position

Constructors

Grid()
Constructs a grid with matrix of cells whose value is all empty
Grid.fromMap(Map<String, dynamic> map)
Serialization
factory

Properties

change Stream
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

cellAt(Position pos) Cell
Getters and setters I can only make these comments so interesting and no more :l
getColumn(int colNum) List<Cell>
Returns a list of Cell at row # colNum
getRow(int rowNum) List<Cell>
Returns a list of Cell at row # rowNum
getSegment(Position position) List<Cell>
Returns a list of Cell at segment defined by position.segment
isColumnViolated(Position position) bool
Determines if a column is violated by using a Set of Cell values If, while building this Set, a duplicate value is going to be added, then this column is violated No violations are counted for empty cells (cells whose value is 0)
isRowViolated(Position position) bool
Determines if a row is violated by using a Set of Cell values If, while building this Set, a duplicate value is going to be added, then this row is violated No violations are counted for empty cells (cells whose value is 0)
isSegmentViolated(Position position) bool
Determines if a segment is violated by using a Set of Cell values If, while building this Set, a duplicate value is going to be added, then this segment is violated No violations are counted for empty cells (cells whose value is 0)
matrix() List<List<Cell>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
pregenFirstRow() → void
Pre-generates the first row of grid with randomized values
startListening() → void
Attach listeners for each cell - the grid is now listening for changes to any cell, and will broadcast them through _onChange
stopListening() → void
Detach all subscriptions to cell streams - stop listening to changes
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited