From ce06fa7c29ba4e3d6137f7aa74fbfe45af0e8b73 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Tue, 5 Mar 2024 22:00:04 -0700 Subject: refactor spawners --- src/engine/components/LambdaSpawn.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/engine/components/LambdaSpawn.ts (limited to 'src/engine/components/LambdaSpawn.ts') diff --git a/src/engine/components/LambdaSpawn.ts b/src/engine/components/LambdaSpawn.ts deleted file mode 100644 index c45092a..0000000 --- a/src/engine/components/LambdaSpawn.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, ComponentNames } from "."; -import { Direction } from "../interfaces"; - -export class LambdaSpawn extends Component { - public direction: Direction | null; - public spawnsLeft: number; - public code: string = ""; - - constructor( - spawnsLeft: number, - code: string, - direction: Direction | null = null, - ) { - super(ComponentNames.LambdaSpawn); - - this.spawnsLeft = spawnsLeft; - this.direction = direction; - this.code = code; - } - - public spawn(direction: Direction) { - if (this.spawnsLeft <= 0) { - return; - } - - this.direction = direction; - this.spawnsLeft -= 1; - } -} -- cgit v1.2.3-70-g09d2