diff --git a/frontend/src/app/app.routes.ts b/frontend/src/app/app.routes.ts
index ce4451c..c536f8f 100644
--- a/frontend/src/app/app.routes.ts
+++ b/frontend/src/app/app.routes.ts
@@ -21,9 +21,4 @@ export const routes: Routes = [
loadComponent: () => import('./feature/game/blackjack/blackjack.component'),
canActivate: [authGuard],
},
- {
- path: 'game/slots',
- loadComponent: () => import('./feature/game/slots/slots.component'),
- canActivate: [authGuard],
- },
];
diff --git a/frontend/src/app/feature/game/blackjack/blackjack.component.ts b/frontend/src/app/feature/game/blackjack/blackjack.component.ts
index a2e760b..3e58e25 100644
--- a/frontend/src/app/feature/game/blackjack/blackjack.component.ts
+++ b/frontend/src/app/feature/game/blackjack/blackjack.component.ts
@@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Router } from '@angular/router';
+import { PlayingCardComponent } from './components/playing-card/playing-card.component';
import { DealerHandComponent } from './components/dealer-hand/dealer-hand.component';
import { PlayerHandComponent } from './components/player-hand/player-hand.component';
import { GameControlsComponent } from './components/game-controls/game-controls.component';
@@ -21,6 +22,7 @@ import { DebtDialogComponent } from '@shared/components/debt-dialog/debt-dialog.
imports: [
CommonModule,
NavbarComponent,
+ PlayingCardComponent,
DealerHandComponent,
PlayerHandComponent,
GameControlsComponent,
diff --git a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
index 6e61c0e..7d78871 100644
--- a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
+++ b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
@@ -8,13 +8,13 @@ import {
SimpleChanges,
ViewChild,
} from '@angular/core';
-import { CommonModule } from '@angular/common';
+import { CommonModule, CurrencyPipe } from '@angular/common';
import { CountUp } from 'countup.js';
@Component({
selector: 'app-animated-number',
standalone: true,
- imports: [CommonModule],
+ imports: [CommonModule, CurrencyPipe],
template: ` {{ formattedValue }} `,
changeDetection: ChangeDetectionStrategy.OnPush,
})
diff --git a/frontend/src/app/feature/game/blackjack/components/game-result/game-result.component.ts b/frontend/src/app/feature/game/blackjack/components/game-result/game-result.component.ts
index 1aab1a4..74d02e4 100644
--- a/frontend/src/app/feature/game/blackjack/components/game-result/game-result.component.ts
+++ b/frontend/src/app/feature/game/blackjack/components/game-result/game-result.component.ts
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
-import { CommonModule } from '@angular/common';
+import { CommonModule, CurrencyPipe } from '@angular/common';
import { animate, style, transition, trigger } from '@angular/animations';
import { GameState } from '../../enum/gameState';
import { AnimatedNumberComponent } from '../animated-number/animated-number.component';
@@ -7,7 +7,7 @@ import { AnimatedNumberComponent } from '../animated-number/animated-number.comp
@Component({
selector: 'app-game-result',
standalone: true,
- imports: [CommonModule, AnimatedNumberComponent],
+ imports: [CommonModule, CurrencyPipe, AnimatedNumberComponent],
template: `
diff --git a/frontend/src/app/feature/game/slots/slots.component.html b/frontend/src/app/feature/game/slots/slots.component.html
deleted file mode 100644
index b6d9318..0000000
--- a/frontend/src/app/feature/game/slots/slots.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
Payouts
- @if (slotInfo(); as info) {
-
-
- @for (item of info | keyvalue; track item.key) {
-
- {{ item.key }} |
- {{ item.value }} |
-
- }
-
-
- }
-
-
-
- @for (row of slotResult().resultMatrix; track $index) {
- @for (cell of row; track $index) {
-
{{ cell }}
- }
- }
-
-
-
-
- Game result: {{ slotResult().status | uppercase }}
-
-
- Amount: {{ slotResult().amount }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/app/feature/game/slots/slots.component.ts b/frontend/src/app/feature/game/slots/slots.component.ts
deleted file mode 100644
index 19ffb57..0000000
--- a/frontend/src/app/feature/game/slots/slots.component.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
-import { NavbarComponent } from '@shared/components/navbar/navbar.component';
-import { HttpClient } from '@angular/common/http';
-import { KeyValuePipe, NgClass, UpperCasePipe } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-interface SlotResult {
- status: 'win' | 'lose' | 'blank' | 'start';
- amount: number;
- resultMatrix: string[][];
-}
-
-@Component({
- selector: 'app-slots',
- standalone: true,
- imports: [NavbarComponent, KeyValuePipe, UpperCasePipe, NgClass, FormsModule],
- templateUrl: './slots.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
-})
-export default class SlotsComponent implements OnInit {
- private httpClient: HttpClient = inject(HttpClient);
- slotInfo = signal
| null>(null);
- slotResult = signal({
- status: 'start',
- amount: 0,
- resultMatrix: [
- ['BAR', 'BAR', 'BAR'],
- ['SEVEN', 'SEVEN', 'SEVEN'],
- ['BELL', 'BELL', 'BELL'],
- ],
- });
- betAmount = signal(1);
-
- ngOnInit(): void {
- this.httpClient.get>('/backend/slots/info').subscribe((data) => {
- this.slotInfo.set(data);
- });
- }
-
- spin(): void {
- const payload = {
- betAmount: this.betAmount(),
- };
-
- this.httpClient.post('/backend/slots/spin', payload).subscribe((result) => {
- this.slotResult.set(result);
- });
- }
-}
diff --git a/frontend/src/app/feature/transaction-history/transaction-history.component.ts b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
index 338ef4e..0bef06d 100644
--- a/frontend/src/app/feature/transaction-history/transaction-history.component.ts
+++ b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
@@ -8,7 +8,8 @@ import {
} from '@angular/core';
import { TransactionService } from '@service/transaction.service';
import { Observable } from 'rxjs';
-import { AsyncPipe, CurrencyPipe, DatePipe, NgIf } from '@angular/common';
+import { AsyncPipe, CurrencyPipe, DatePipe, NgForOf, NgIf } from '@angular/common';
+import { AnimatedNumberComponent } from '@blackjack/components/animated-number/animated-number.component';
import { TransactionData } from '../../model/TransactionData';
const PER_PAGE = 5;
@@ -16,7 +17,7 @@ const PER_PAGE = 5;
@Component({
standalone: true,
selector: 'app-transaction-history',
- imports: [AsyncPipe, CurrencyPipe, DatePipe, NgIf],
+ imports: [NgForOf, AsyncPipe, CurrencyPipe, DatePipe, AnimatedNumberComponent, NgIf],
templateUrl: './transaction-history.component.html',
styleUrl: './transaction-history.component.css',
changeDetection: ChangeDetectionStrategy.OnPush,
diff --git a/frontend/src/app/shared/components/navbar/navbar.component.ts b/frontend/src/app/shared/components/navbar/navbar.component.ts
index 5405b07..6cc6f56 100644
--- a/frontend/src/app/shared/components/navbar/navbar.component.ts
+++ b/frontend/src/app/shared/components/navbar/navbar.component.ts
@@ -8,6 +8,7 @@ import {
} from '@angular/core';
import { RouterModule } from '@angular/router';
import { AuthService } from '../../../service/auth.service';
+import { CurrencyPipe } from '@angular/common';
import { UserService } from '@service/user.service';
import { Subscription } from 'rxjs';
import { AnimatedNumberComponent } from '@blackjack/components/animated-number/animated-number.component';
@@ -16,7 +17,7 @@ import { AnimatedNumberComponent } from '@blackjack/components/animated-number/a
selector: 'app-navbar',
templateUrl: './navbar.component.html',
standalone: true,
- imports: [RouterModule, AnimatedNumberComponent],
+ imports: [RouterModule, CurrencyPipe, AnimatedNumberComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavbarComponent implements OnInit, OnDestroy {