diff --git a/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.scss b/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.scss index 09625927..187ff83d 100644 --- a/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.scss +++ b/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.scss @@ -9,7 +9,7 @@ .user-drawing-board { border-radius: 0.6em; - padding: 0.4em; // this is what controls the width of the border + padding: 0.4em; // controls the width of the border background-color: white; width: 390px; height: 280px; diff --git a/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.ts b/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.ts index 2aaa443e..9e155623 100644 --- a/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.ts +++ b/src/app/game/game-intermediate-result/game-drawing-display/game-drawing-display.component.ts @@ -10,15 +10,18 @@ import { DrawingService } from '../../services/drawing.service'; styleUrl: './game-drawing-display.component.scss', }) export class GameDrawingDisplayComponent implements OnInit { - @Input() hasCorrectGuess: boolean | undefined; - @Input() drawingURL: string | undefined; - @Input() roundScore: number | undefined; secondsUsed = 0; + drawingURL = ''; + hasCorrectGuess = false; + roundScore = 0; constructor(private drawingService: DrawingService) {} ngOnInit(): void { this.secondsUsed = this.drawingService.getSecondsUsed(); + this.drawingURL = this.drawingService.lastResult.imageData; + this.hasCorrectGuess = this.drawingService.lastResult.hasWon; + this.roundScore = this.drawingService.lastResult.score; this.drawingService.resetSecondsUsed(); } diff --git a/src/app/game/game-intermediate-result/game-drawing-feedback/game-drawing-feedback.component.html b/src/app/game/game-intermediate-result/game-drawing-feedback/game-drawing-feedback.component.html index 766e8121..668adc9c 100644 --- a/src/app/game/game-intermediate-result/game-drawing-feedback/game-drawing-feedback.component.html +++ b/src/app/game/game-intermediate-result/game-drawing-feedback/game-drawing-feedback.component.html @@ -1,7 +1,7 @@