advent-of-code

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

game.ts (350B)


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