more refactor
This commit is contained in:
parent
9933f4f9ff
commit
d612678682
1 changed files with 36 additions and 52 deletions
|
|
@ -4,7 +4,7 @@ import { Block } from './block';
|
|||
import { Serializable } from './serializable';
|
||||
import { hash } from '../utils/hash';
|
||||
import { IColor } from '../interfaces/color';
|
||||
import { InnerNodeState } from '../store/inner-node';
|
||||
import { InnerNode, InnerNodeState } from '../store/inner-node';
|
||||
|
||||
export type ColoredBlock = Block & { color: IColor };
|
||||
|
||||
|
|
@ -23,7 +23,8 @@ export class Tower extends Serializable implements ITower, TowerState {
|
|||
readonly baseColor: IColor;
|
||||
|
||||
constructor(props: ITower) {
|
||||
super(props, 'Tower');
|
||||
super(props, 'Tower', props.blocks.map(b => new Block(b)));
|
||||
this.onAfterClone();
|
||||
}
|
||||
|
||||
protected onAfterClone() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue