2024-06-17 15:37:17 +03:00
|
|
|
import { Game } from "@mancala/core";
|
|
|
|
|
import { BackendGame } from "../../models/Game";
|
2022-07-15 21:42:38 +03:00
|
|
|
|
|
|
|
|
export interface GameStore {
|
2024-06-17 15:37:17 +03:00
|
|
|
get(id: string): BackendGame | undefined;
|
|
|
|
|
set(id: string, game: BackendGame): void;
|
2022-07-15 21:42:38 +03:00
|
|
|
remove(id: string): void;
|
2022-07-31 00:10:34 +03:00
|
|
|
|
|
|
|
|
setGameIdByUser(userId: string, gameId: string): void;
|
|
|
|
|
getGameIdByUser(userId: string): string | undefined;
|
|
|
|
|
removeGameIdByPlayer(userId: string): void;
|
|
|
|
|
|
2024-06-17 15:37:17 +03:00
|
|
|
setGameByUser(userId: string, game: BackendGame): void;
|
|
|
|
|
getGameByUser(userId: string): BackendGame | undefined;
|
2022-07-31 00:10:34 +03:00
|
|
|
removeGameByPlayer(userId: string): void;
|
2022-09-02 00:33:31 +03:00
|
|
|
|
|
|
|
|
getSpeactatingGameIdsByUser(userId: string): string[]
|
2022-07-15 21:42:38 +03:00
|
|
|
}
|