Class XSudokuCell

java.lang.Object
algs13.xbacktrack.xsudoku.XSudokuCell
Direct Known Subclasses:
XImmutableCell, XMutableCell

abstract class XSudokuCell extends Object
A cell in a Sudoku grid. Each cell has an x (row) coordinate and y (column) coordinate, and is part of a subgrid. These properties are fixed at the time a cell is constructed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int
     
    (package private) final int
     
    (package private) final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    XSudokuCell(int x, int y)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) abstract int
    Get the digit currently associated with this cell.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      final int x
    • y

      final int y
    • subgridId

      final int subgridId
  • Constructor Details

  • Method Details

    • getDigit

      abstract int getDigit()
      Get the digit currently associated with this cell.
      Returns:
      the digit associated with this cell