Position class

Represents the cartesian position of a cell on a typical Sudoku 9x9 grid X and Y are row and column respectfully.

      SEG0    SEG1    SEG2
     0 1 2   3 4 5   6 7 8
   -------------------------
 0 | 0 0 0 | 0 0 0 | 0 0 0 |

SEG0 1 | 0 0 0 | 0 0 0 | 0 0 0 | 2 | 0 0 0 | 0 0 0 | 0 0 0 | ------------------------- 3 | 0 0 0 | 0 0 0 | 0 0 0 | SEG1 4 | 0 0 0 | 0 0 0 | 0 0 0 | 5 | 0 0 0 | 0 0 0 | 0 0 0 | ------------------------- 6 | 0 0 0 | 0 0 0 | 0 0 0 | SEG2 7 | 0 0 0 | 0 0 0 | 0 0 0 | 8 | 0 0 0 | 0 0 0 | 0 0 0 | -------------------------

Constructors

Position({int row = -1, int column = -1, int index = -1})
Construct a cell position, using either a row/column pair, or index
Position.fromMap(Map<String, dynamic> json)
Serialization
factory

Properties

grid Point<num>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
index int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
segment Point<num>
read / write

Methods

isValid() bool
Determine if position is valid via simple range check of index
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited

Operators

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