style: format code and add missing newlines
All checks were successful
CI / Get Changed Files (pull_request) Successful in 7s
CI / prettier (pull_request) Successful in 22s
CI / eslint (pull_request) Successful in 24s
CI / test-build (pull_request) Successful in 56s
CI / Checkstyle Main (pull_request) Successful in 1m40s

This commit is contained in:
Jan-Marlon Leibl 2025-04-02 09:08:04 +02:00
parent 732d475a84
commit f1c70f5f2c
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
3 changed files with 11 additions and 6 deletions

View file

@ -16,7 +16,10 @@ import { GameControlsService } from '../../services/game-controls.service';
Deine Punkte: {{ gameControlsService.calculateHandValue(playerCards) }}
</div>
<div class="text-text-secondary">
Status: <span [class]="gameControlsService.getStatusClass(gameState)">{{ gameControlsService.getStatusText(gameState) }}</span>
Status:
<span [class]="gameControlsService.getStatusClass(gameState)">{{
gameControlsService.getStatusText(gameState)
}}</span>
</div>
</div>
</div>
@ -54,7 +57,9 @@ import { GameControlsService } from '../../services/game-controls.service';
<button
(click)="doubleDown.emit()"
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px] relative"
[disabled]="gameState !== GameState.IN_PROGRESS || playerCards.length !== 2 || isActionInProgress"
[disabled]="
gameState !== GameState.IN_PROGRESS || playerCards.length !== 2 || isActionInProgress
"
[class.opacity-50]="isActionInProgress"
>
<span [class.invisible]="isActionInProgress">Verdoppeln</span>
@ -82,7 +87,7 @@ import { GameControlsService } from '../../services/game-controls.service';
export class GameControlsComponent {
@Input() playerCards: Card[] = [];
@Input() gameState: GameState = GameState.IN_PROGRESS;
@Input() isActionInProgress: boolean = false;
@Input() isActionInProgress = false;
@Output() hit = new EventEmitter<void>();
@Output() stand = new EventEmitter<void>();

View file

@ -3,7 +3,7 @@ import { Card } from '../models/blackjack.model';
import { GameState } from '../../../../enum/gameState';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class GameControlsService {
calculateHandValue(cards: Card[]): number {