File

src/app/models/castel-cell.ts

Constructor

constructor(id: any, value: any, castelGrid: any)

Properties

Private castelGrid
castelGrid: any
col
col: number
Public done
done: boolean
Default value: false
Public hilightCell
hilightCell: false
Public id
id: any
Public resultClass
resultClass: string
row
row: number
Public selected
selected: boolean
Default value: false
Public state
state: string
Public value
value: any
export class CastelCell {

    public value;
    public id;
    public state: string;
    private castelGrid;
    public hilightCell: false;
    public resultClass: string;
	public selected = false;

	public done = false;

    constructor(id, value, castelGrid) {
        this.id = id;
        this.value = value;
        this.castelGrid = castelGrid;
    }

    get row() {
        return Math.floor(this.id / this.castelGrid.nbCols);
    }
    get col() {
        return this.id % this.castelGrid.nbCols;
    }
}

results matching ""

    No results matching ""