Constructed using 2d array of Cells Maintains metadata about arary of Cells

Hierarchy

  • CellBoard

Constructors

Properties

cellGroups: Cell[][][]
cells: Cell[][]
indexesPlaced: Group[][]
indexesWithNote: Group[][][]
searchedGroups: boolean[][][]
valuesPlaced: Group[][]

Methods

  • Given a group and indexes returns the corresponding cell

    Returns

    Cell with given group and indexes

    Parameters

    • group: GroupEnum

      group e.g. row

    • groupIndex: number

      group index e.g. 5th row

    • index: number

      index e.g. 7th cell in 5th row

    Returns Cell

  • Given group and its index returns all of the cells in it

    Returns

    array containing all cells in given group

    Parameters

    • group: GroupEnum

      group e.g. row

    • index: number

      index e.g. 7th row

    Returns Cell[]

  • Given group and its index returns all of the empty cells in it

    Returns

    array containing all empty cells in given group

    Parameters

    • group: GroupEnum

      group e.g. row

    • index: number

      index e.g. 7th row

    Returns Cell[]

  • Gets indexes in which values have been placed in given group

    Returns

    Group object containing indexes with values placed in them in given group

    Parameters

    • group: GroupEnum

      Group type e.g. row

    • index: number

      index e.g. 2 = 3rd

    Returns Group

  • Given a group and a note returns Group object containing indexes of cells containing the note in the group

    Returns

    group containing indexes of cells in given group containing given note

    Parameters

    • groupType: GroupEnum

      group type e.g. row

    • index: number

      index e.g. 3 (4th row)

    • note: number

      note e.g. 4 (refers to "3")

    Returns Group

  • Checks whether or not a given group has been searched for a given strategy already

    Returns

    whether or not given group has been searched for given strategy

    Parameters

    • strategyType: StrategyEnum

      strategy type e.g. amend notes

    • groupType: GroupEnum

      group type e.g. row

    • groupIndex: number

      group index e.g. 3 (4th cell in group)

    Returns boolean

  • Gets values placed in given group e.g. Group representing 3rd row

    Returns

    Group object containing values placed in given row

    Parameters

    • group: GroupEnum

      Group type e.g. row

    • index: number

      index e.g. 2 = 3rd

    Returns Group

  • Removes given notes from given cell

    Parameters

    • row: number

      row Cell is in

    • column: number

      column Cell is in

    • notes: Group

      notes being removed from Cell

    Returns void

  • Adds all notes back into Cell (used for amend notes strategy)

    Parameters

    • row: number

      row Cell is in

    • column: number

      column Cell is in

    Returns void

  • Reset searchedGroups to false for all groups that given cell (which is being updated) is a part of

    Parameters

    • row: number

      row where updated cell is

    • column: number

      column where updated cell is

    Returns void

  • Sets whether or not a given group has been searched for a given strategy already

    Parameters

    • strategyType: StrategyEnum

      strategy type e.g. amend notes

    • groupType: GroupEnum

      group type e.g. row

    • groupIndex: number

      group index e.g. 3 (4th cell in group)

    • searched: boolean

    Returns void

  • Sets given value for given cell and updates metadata

    Parameters

    • row: number

      row Cell is in

    • column: number

      column Cell is in

    • value: string

      value being placed in Cell

    Returns void

Generated using TypeDoc