src/app/models/castel-cell.ts
constructor(id: any, value: any, castelGrid: any)
|
| Private castelGrid |
castelGrid: |
| col |
col: |
| Public done |
done: |
Default value: false
|
| Public hilightCell |
hilightCell: |
| Public id |
id: |
| Public resultClass |
resultClass: |
| row |
row: |
| Public selected |
selected: |
Default value: false
|
| Public state |
state: |
| Public value |
value: |
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;
}
}