stash work
This commit is contained in:
20
src/managers/characterManager.ts
Normal file
20
src/managers/characterManager.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { ExtendedCharacter } from '../utilities/types'
|
||||
import { Zone } from '@prisma/client'
|
||||
|
||||
|
||||
class CharacterManager {
|
||||
|
||||
private characters!: ExtendedCharacter[];
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
public addCharacterToZone(character: ExtendedCharacter) {
|
||||
this.characters = [...this.characters, character]
|
||||
}
|
||||
|
||||
public getCharactersByZone(zone: Zone) {
|
||||
return this.characters.filter(x => x.zoneId === zone.id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user