This commit is contained in:
Andras Schmelczer 2019-09-16 15:18:23 +02:00
parent 97e94ec154
commit 674f07f5f1
9 changed files with 51 additions and 26 deletions

View file

@ -56,7 +56,9 @@ export class TowerComponent implements OnInit {
});
if (
(difference.every(i => i) && this.tower.blocks.length + 1 === value.blocks.length) ||
(difference.every(i => i) &&
this.tower.blocks.length + 1 === value.blocks.length &&
top(value.blocks).isDone) ||
(this.tower.blocks.length === value.blocks.length &&
this.tower.blocks.filter(b => b.isDone).length + 1 === value.blocks.filter(b => b.isDone).length)
) {