refactor
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user