15 lines
380 B
TypeScript
15 lines
380 B
TypeScript
import { PRNG } from "seedrandom";
|
|
import { Board } from "./entities/Board";
|
|
import { Tile } from "./entities/Tile";
|
|
|
|
export class SimulatedBoard extends Board {
|
|
constructor(tiles: Tile[] = [], rng: PRNG) {
|
|
super(rng);
|
|
this.tiles = tiles;
|
|
}
|
|
|
|
evaluate(): number {
|
|
return this.tiles.length;
|
|
//return this.tiles.reduce((acc, tile) => acc + tile.count, 0);
|
|
}
|
|
} |