Skip to content

Commit

Permalink
Merge branch 'develop' into SP24-787-stats
Browse files Browse the repository at this point in the history
  • Loading branch information
ellenyuX authored Oct 8, 2024
2 parents d81741a + ecf5c39 commit f30ce1c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export class WrongGuessComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.label = this.drawingService.lastResult.word;
this.updateAiGuess(this.drawingService.sortedCertainty);

if (this.gameStateService.isSingleplayer()) {
this.exampleDrawings = this.exampleDrawingService.getExampleDrawings(2);
this.getSingleplayerExamples();
Expand All @@ -56,7 +55,6 @@ export class WrongGuessComponent implements OnInit, OnDestroy {

getSingleplayerExamples() {
if (this.guess === "") {
console.log("helo")
return
}
this.aiGuessSubscription.add(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../variables.scss';
@import '../../../variables.scss';

.container {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { Component, OnInit, OnDestroy, inject } from '@angular/core';
import { MultiplayerService } from '../game/services/multiplayer.service';
import { DrawingService } from '../game/services/drawing.service';
import { MultiplayerService } from '../services/multiplayer.service';
import { DrawingService } from '../services/drawing.service';
import { Router, RouterLink, RouterLinkActive } from '@angular/router';
import { MatIcon } from '@angular/material/icon';
import { MatButton } from '@angular/material/button';
import { TranslationService } from '../core/translation.service';
import { TranslatePipe } from '../core/translation.pipe';
import { TranslationService } from '../../core/translation.service';
import { TranslatePipe } from '../../core/translation.pipe';
import { Observable, Subject, takeUntil } from 'rxjs';
import { CommonModule } from '@angular/common';
import { GAMESTATE } from '../shared/models/interfaces';
import { GameStateService } from '../game/services/game-state-service';
import { SupportedLanguages } from '../shared/models/interfaces';
import { GAMESTATE } from '../../shared/models/interfaces';
import { GameStateService } from '../services/game-state-service';
import { SupportedLanguages } from '../../shared/models/interfaces';
import { ArrowAlignment, PointerSide } from '@/app/shared/models/interfaces';
import { trigger, state, style, animate, transition } from '@angular/animations';
import { SpeechBubbleComponent } from '../game/shared-components/speech-bubble/speech-bubble.component';
import { CustomColorsIO } from '../shared/customColors';
import { CustomButtonComponent } from '../game/shared-components/custom-button/custom-button.component';
import { SpeechBubbleComponent } from '../shared-components/speech-bubble/speech-bubble.component';
import { CustomColorsIO } from '../../shared/customColors';
import { CustomButtonComponent } from '../shared-components/custom-button/custom-button.component';
import { ButtonStyleClass } from '@/app/shared/buttonStyles';

@Component({
selector: 'app-welcome',
templateUrl: './welcome.component.html',
styleUrls: ['./welcome.component.scss'],
selector: 'app-game-welcome',
templateUrl: './game-welcome.component.html',
styleUrls: ['./game-welcome.component.scss'],
standalone: true,
imports: [
RouterLink,
Expand Down Expand Up @@ -53,7 +53,7 @@ import { ButtonStyleClass } from '@/app/shared/buttonStyles';
]),
],
})
export class WelcomeComponent implements OnInit, OnDestroy {
export class GameWelcomeComponent implements OnInit, OnDestroy {
currentLang$: Observable<string>;
private destroy$ = new Subject<void>();
private animationTimeouts: NodeJS.Timeout[] = [];
Expand Down
2 changes: 1 addition & 1 deletion src/app/game/game.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</div>
} @case (GAMESTATE.lobby) {
<div [@enterAnimation]>
<app-welcome></app-welcome>
<app-game-welcome></app-game-welcome>
</div>
} }
4 changes: 2 additions & 2 deletions src/app/game/game.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GameInfoComponent } from './game-info/game-info.component';
import { GamePickDifficultyComponent } from './game-pick-difficulty/game-pick-difficulty.component';
import { GameStateService } from './services/game-state-service';
import { LobbyComponent } from './game-multiplayer/lobby/lobby.component';
import { WelcomeComponent } from '../welcome/welcome.component';
import { GameWelcomeComponent } from '../game/game-welcome/game-welcome.component';

@Component({
selector: 'app-game',
Expand Down Expand Up @@ -49,7 +49,7 @@ import { WelcomeComponent } from '../welcome/welcome.component';
GameResultComponent,
GameWordToDrawComponent,
LobbyComponent,
WelcomeComponent,
GameWelcomeComponent,
],
})
export class GameComponent implements OnInit {
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Routes } from '@angular/router';
import { SplashComponent } from './splash/splash.component';
import { WelcomeComponent } from './welcome/welcome.component';
import { GameWelcomeComponent } from './game/game-welcome/game-welcome.component';
import { GameComponent } from './game/game.component';
import { routes as r } from './shared/models/routes';
import { GameResultComponent } from './game/game-result/game-result.component';
Expand All @@ -18,7 +18,7 @@ export const routes: Routes = [
},
{
path: r.WELCOME,
component: WelcomeComponent,
component: GameWelcomeComponent,
data: { animationState: 'welcome' },
},
{
Expand Down

0 comments on commit f30ce1c

Please sign in to comment.