feat: added game active page

This commit is contained in:
Lala, Shahd
2026-05-14 23:54:26 +00:00
parent 490e2cb760
commit b48060c6cb
9 changed files with 708 additions and 0 deletions
+3
View File
@@ -8,6 +8,7 @@ import { GameCompletionService } from '../../services/game-completion.service';
import { GameImportService } from '../../services/game-import.service';
import { BoardSelectionService, BoardSelection } from '../../services/board-selection.service';
import { GameStreamService } from '../../services/game-stream.service';
import { GameHistoryService } from '../../services/game-history.service';
@Injectable()
export class GameFacade implements OnDestroy {
@@ -37,6 +38,7 @@ export class GameFacade implements OnDestroy {
private readonly importService = inject(GameImportService);
private readonly boardSelectionService = inject(BoardSelectionService);
private readonly streamService = inject(GameStreamService);
private readonly gameHistory = inject(GameHistoryService);
get state(): GameState | null {
return this.game?.state ?? null;
@@ -212,6 +214,7 @@ export class GameFacade implements OnDestroy {
this.clockSyncedAt = Date.now();
this.loading = false;
this.updateGameCompletion();
this.gameHistory.recordGame(this.gameId);
this.startStreaming();
this.tryMakeBotMove();
},