befora claude just in case
Some checks failed
CI / Get Changed Files (pull_request) Successful in 7s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Failing after 21s
CI / eslint (pull_request) Failing after 28s
CI / prettier (pull_request) Successful in 27s
CI / test-build (pull_request) Successful in 40s
CI / Docker frontend validation (pull_request) Successful in 1m7s
Some checks failed
CI / Get Changed Files (pull_request) Successful in 7s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Failing after 21s
CI / eslint (pull_request) Failing after 28s
CI / prettier (pull_request) Successful in 27s
CI / test-build (pull_request) Successful in 40s
CI / Docker frontend validation (pull_request) Successful in 1m7s
This commit is contained in:
parent
41f3b506a0
commit
09677effe6
4 changed files with 140 additions and 9 deletions
|
@ -1,4 +1,7 @@
|
|||
import { CurrencyPipe } from '@angular/common';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
|
||||
import { AnimatedNumberComponent } from '@blackjack/components/animated-number/animated-number.component';
|
||||
import { GameInfoComponent } from '@blackjack/components/game-info/game-info.component';
|
||||
import { AuthService } from '@service/auth.service';
|
||||
import { AudioService } from '@shared/services/audio.service';
|
||||
|
@ -6,8 +9,9 @@ import { AudioService } from '@shared/services/audio.service';
|
|||
@Component({
|
||||
selector: 'app-coinflip',
|
||||
standalone: true,
|
||||
imports: [GameInfoComponent],
|
||||
imports: [AnimatedNumberComponent, CurrencyPipe],
|
||||
templateUrl: './coinflip.component.html',
|
||||
styleUrl: './coinflip.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export default class CoinflipComponent implements OnInit {
|
||||
|
@ -18,9 +22,23 @@ export default class CoinflipComponent implements OnInit {
|
|||
audioService = inject(AudioService);
|
||||
authService = inject(AuthService);
|
||||
|
||||
private http = inject(HttpClient);
|
||||
|
||||
setBetAmount(amount: number) {
|
||||
this.currentBet.update((current) => current * amount);
|
||||
}
|
||||
|
||||
onNewGame(bet: number): void {
|
||||
this.isActionInProgress.set(true);
|
||||
this.audioService.playBetSound();
|
||||
this.currentBet.set(bet);
|
||||
}
|
||||
|
||||
betHeads() {
|
||||
this.gameInProgress.set(true);
|
||||
}
|
||||
betTails() {
|
||||
this.gameInProgress.set(true);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
Reference in a new issue