refactor: update import paths for better readability #109

Merged
jank merged 10 commits from refactor-some-dots into task/CAS-50/add_rest_blackjack_logic_with_frontend_animations 2025-04-02 07:27:11 +00:00
8 changed files with 18 additions and 11 deletions
Showing only changes of commit a425fdea80 - Show all commits

View file

@ -16,12 +16,12 @@ import {
} from '@angular/core'; } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { loadStripe, Stripe } from '@stripe/stripe-js'; import { loadStripe, Stripe } from '@stripe/stripe-js';
import { DepositService } from '../../service/deposit.service';
import { debounceTime } from 'rxjs'; import { debounceTime } from 'rxjs';
import { environment } from '../../../environments/environment';
import { NgIf } from '@angular/common'; import { NgIf } from '@angular/common';
import { ModalAnimationService } from '../../shared/services/modal-animation.service';
import gsap from 'gsap'; import gsap from 'gsap';
import { DepositService } from '@service/deposit.service';
import { environment } from '@environments/environment';
import { ModalAnimationService } from '@shared/services/modal-animation.service';
@Component({ @Component({
selector: 'app-deposit', selector: 'app-deposit',

View file

@ -1,8 +1,6 @@
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core'; import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NavbarComponent } from '../../../shared/components/navbar/navbar.component';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { UserService } from '../../../service/user.service';
import { PlayingCardComponent } from './components/playing-card/playing-card.component'; import { PlayingCardComponent } from './components/playing-card/playing-card.component';
import { DealerHandComponent } from './components/dealer-hand/dealer-hand.component'; import { DealerHandComponent } from './components/dealer-hand/dealer-hand.component';
import { PlayerHandComponent } from './components/player-hand/player-hand.component'; import { PlayerHandComponent } from './components/player-hand/player-hand.component';
@ -13,6 +11,8 @@ import { BlackjackService } from './services/blackjack.service';
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { GameResultComponent } from './components/game-result/game-result.component'; import { GameResultComponent } from './components/game-result/game-result.component';
import { GameState } from './enum/gameState'; import { GameState } from './enum/gameState';
import { NavbarComponent } from '../../../shared/components/navbar/navbar.component';
import { UserService } from '../../../service/user.service';
@Component({ @Component({
selector: 'app-blackjack', selector: 'app-blackjack',

View file

@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core'; import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Card } from '@blackjack/models/blackjack.model';
import { PlayingCardComponent } from '../playing-card/playing-card.component'; import { PlayingCardComponent } from '../playing-card/playing-card.component';
import { Card } from '../../models/blackjack.model';
@Component({ @Component({
selector: 'app-dealer-hand', selector: 'app-dealer-hand',

View file

@ -96,5 +96,5 @@ export class GameControlsComponent {
protected readonly GameState = GameState; protected readonly GameState = GameState;
constructor(protected gameControlsService: GameControlsService) {} constructor(protected gameControlsService: GameControlsService) { }
} }

View file

@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core'; import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { PlayingCardComponent } from '../playing-card/playing-card.component'; import { PlayingCardComponent } from '../playing-card/playing-card.component';
import { Card } from '../../models/blackjack.model'; import { Card } from '@blackjack/models/blackjack.model';
@Component({ @Component({
selector: 'app-player-hand', selector: 'app-player-hand',

View file

@ -8,8 +8,8 @@ import {
SimpleChanges, SimpleChanges,
} from '@angular/core'; } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { suitSymbols, Suit } from '../../models/blackjack.model';
import { gsap } from 'gsap'; import { gsap } from 'gsap';
import { Suit, suitSymbols } from '@blackjack/models/blackjack.model';
@Component({ @Component({
selector: 'app-playing-card', selector: 'app-playing-card',
@ -58,7 +58,7 @@ export class PlayingCardComponent implements AfterViewInit, OnChanges {
@Input({ required: true }) hidden!: boolean; @Input({ required: true }) hidden!: boolean;
@Input() isNew = false; @Input() isNew = false;
constructor(private elementRef: ElementRef) {} constructor(private elementRef: ElementRef) { }
get isRedSuit(): boolean { get isRedSuit(): boolean {
return this.suit === 'HEARTS' || this.suit === 'DIAMONDS'; return this.suit === 'HEARTS' || this.suit === 'DIAMONDS';

View file

@ -1,7 +1,7 @@
import { Injectable, inject } from '@angular/core'; import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Observable, catchError } from 'rxjs'; import { Observable, catchError } from 'rxjs';
import { BlackjackGame } from '../models/blackjack.model'; import { BlackjackGame } from '@blackjack/models/blackjack.model';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',

View file

@ -3,6 +3,13 @@
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./src",
"paths": {
"@service/*": ["app/service/*"]
"@environments/*": ["environments/*"]
"@shared/*": ["app/shared/*"]
"@blackjack/*": ["app/feature/game/blackjack/*"]
},
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"strict": true, "strict": true,
"noImplicitOverride": true, "noImplicitOverride": true,