import { Game } from "@uno-game/protocols" ; import { Store } from "@/Protocols/StoreProtocol" ; import AsyncMapStoreService from "@/Services/AsyncMapStoreService" ; class GameRepository { private static games : Store < Game > = new AsyncMapStoreService ( ) ; static async setGameData ( gameId , game ) { await this . games . set ( gameId , game ) ; } static async getGame ( gameId ) { const game = await this . games . getOne ( gameId ) ; return game ; } static async getGameList ( ) { const games = await this . games . getAll ( ) ; return games ; } } export default GameRepository ;