~hokiegeek/biologist-web

6f953efc1284177078b3366fd8ee300fb26775af — HokieGeek 1 year, 9 months ago 6985507 1.3.2-1
Fixed casting error
2 files changed, 25 insertions(+), 9 deletions(-)

M package.json
M src/app/lab.service.ts
M package.json => package.json +1 -1
@@ 1,6 1,6 @@
{
  "name": "biologist-web",
  "version": "1.3.1",
  "version": "1.3.2",
  "license": "MIT",
  "scripts": {
    "ng": "ng",

M src/app/lab.service.ts => src/app/lab.service.ts +24 -8
@@ 54,19 54,35 @@ const pollRateMs = 1000;
const maxGenerationsPerPoll = 25;

export class Experiment {
    id: string;
    rows: number;
    columns: number;
    initialDensity: number;
    autoStart: boolean;
    seed: Generation;
    generations: { [gen: number]: Generation } = {};
    maxGenerations: number;
    public id: string;
    public initialDensity: number;
    public autoStart: boolean;
    public seed: Generation;
    public generations: { [gen: number]: Generation } = {};
    public maxGenerations: number;
    private _rows: number;
    private _columns: number;
    private lowGeneration = 0;
    private highGeneration = 0;
    private isPolling = true;
    private poller;

    set rows(r: number) {
        this._rows = +r;
    }

    get rows(): number {
        return this._rows;
    }

    set columns(c: number) {
        this._columns = +c;
    }

    get columns(): number {
        return this._columns;
    }

    constructor(private lab: Lab, rows: number, columns: number, density: number, autoStart: boolean, maxGenerations: number) {
        this.rows = rows;
        this.columns = columns;