16 lines
464 B
TypeScript
16 lines
464 B
TypeScript
import { MancalaGame } from "mancala.js";
|
|
import { GameStore } from "./GameStore";
|
|
|
|
export class GameStoreImpl implements GameStore {
|
|
gameStore: Map<string, MancalaGame> = new Map<string, MancalaGame>()
|
|
|
|
get(id: string): MancalaGame | undefined {
|
|
return this.gameStore.get(id);
|
|
}
|
|
set(id: string, game: MancalaGame): void {
|
|
this.gameStore.set(id, game);
|
|
}
|
|
remove(id: string): void {
|
|
this.gameStore.delete(id);
|
|
}
|
|
} |