a bad idea caused problems: no more Cell.getColor()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user