This commit is contained in:
2025-12-17 12:05:00 +01:00
parent 4d890863d3
commit 07dfefebe4
65 changed files with 6034 additions and 778 deletions

View File

@@ -5,12 +5,8 @@ import { Logger } from '@core/shared/application';
export class InMemoryGameRepository implements IGameRepository {
private games: Map<string, Game> = new Map();
constructor(private readonly logger: Logger, initialGames: Game[] = []) {
constructor(private readonly logger: Logger) {
this.logger.info('InMemoryGameRepository initialized.');
for (const game of initialGames) {
this.games.set(game.id, game);
this.logger.debug(`Seeded game: ${game.id} (${game.name}).`);
}
}
async findById(id: string): Promise<Game | null> {