advent-of-code

Entries to advent of code, multiple years
git clone git://git.finwo.net/misc/advent-of-code
Log | Files | Refs

board.ts (332B)


      1 import { v4 as uuidv4 } from 'uuid';
      2 import { Game } from './game';
      3 
      4 export class Board {
      5   public uuid   : string;
      6   public values : number[][];
      7   public game   : (Game|string)[];
      8 
      9   constructor(data?: Partial<Board>) {
     10     this.uuid = uuidv4();
     11     if (data) Object.assign(this, data);
     12     this.values = this.values || [];
     13   }
     14 
     15 }