a bad idea caused problems: no more Cell.getColor()

This commit is contained in:
Gavin McDonald
2018-09-15 00:03:36 -04:00
parent d5862b2c97
commit 2c671c2f99
4 changed files with 10 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
import {getColor, random} from './utils.js';
import {random} from './utils.js';
import {
HEX, CIRCLE, SQUARE,
FLAT, POINTY,
@@ -25,13 +25,7 @@ const DEFAULTS = {
export default class Cell {
constructor(settings) {
this.getColor = this.getColor.bind(this);
Object.assign(this, DEFAULTS, settings);
}
getColor() {
return getColor(this.color);
}
}