Home | Trees | Indices | Help |
|
---|
|
object --+ | Cell
The class Cell
represents cells on a Sudoku chart. Each
cell can have a positive integer stored in it, or be empty.
As long as a cell is empty, the cell object keeps track of the
possible placing options that are available for the cell. That is, each
cell knows which numbers can be legally placed in the cell (as per Sudoku
game rules). Initially, the available placing options include consist of
all the numbers from 1 to the size of the Sudoku chart the options can be
reduced with the method remove_option
.
See Also: Chart
|
|||
|
|||
int |
|
||
boolean |
|
||
|
|||
boolean |
|
||
boolean |
|
||
Inherited from |
|
|||
Inherited from |
|
Creates a new empty cell which has all the positive integers from 1 to the given chart size as possible options to fill the cell with.
|
Returns the number in this cell, if there is one.
|
Determines if the cell is empty.
|
Marks the given number as no longer being a possible option for filling the cell. (This method should be called when other cells on the same line or in the same region are filled, making it impossible to use the same number for this cell.)
|
Fills the cell with the given number. This can only be done if the given number is one of the viable options for this cell.
See Also: #is_option |
Determines if the given number can be placed in the cell, i.e., if the
number has not been marked with
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Aug 31 10:38:39 2012 | http://epydoc.sourceforge.net |