denque
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import Denque from "denque";
|
||||
|
||||
export class GameEngine {
|
||||
|
||||
private static instance: GameEngine | null = null;
|
||||
|
||||
private npcActionQueue = new Denque<unknown>();
|
||||
private apiActionQueue = new Denque<unknown>();
|
||||
|
||||
private constructor() {
|
||||
|
||||
}
|
||||
|
||||
public static getInstance() {
|
||||
if (!GameEngine.instance) {
|
||||
GameEngine.instance = new GameEngine();
|
||||
}
|
||||
return GameEngine.instance;
|
||||
}
|
||||
|
||||
public async start() {
|
||||
|
||||
console.log('GameEngine started');
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
console.log('GameEngine stopped');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user