feat: added game active page
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user