diff --git a/src/app/services/game.service.ts b/src/app/services/game.service.ts index 323a820..57f401f 100644 --- a/src/app/services/game.service.ts +++ b/src/app/services/game.service.ts @@ -25,6 +25,8 @@ export class GameService { @Output() onCardDrawn: EventEmitter = new EventEmitter(); @Output() onChugDone: EventEmitter = new EventEmitter(); + private useOldSounds = false; + public game: Game = new Game(); public deck: Card[] = []; @@ -119,6 +121,22 @@ export class GameService { ); } + private playSoundForDraw(card: Card) { + if (this.useOldSounds) { + if (card.value !== 14 && ["C", "D", "H", "S"].includes(card.suit)) { + const soundName = `old/${card.suit}-${card.value}`; + this.sounds.play(soundName); + return; + } + } + + if (card.value === 12 && ["S", "C"].includes(card.suit)) { + if (Math.random() < 0.25) { + this.sounds.play("ole_vedel"); + } + } + } + public draw() { if (this.getNumberOfCardsLeft() === 0) { return; @@ -138,11 +156,7 @@ export class GameService { }, }); - if (draw.value === 12 && (draw.suit === "S" || draw.suit === "C")) { - if (Math.random() < 0.25) { - this.sounds.play("ole_vedel"); - } - } + this.playSoundForDraw(draw); // Check if ace or game done if (draw.value === 14) { @@ -544,4 +558,8 @@ export class GameService { } return durations; } + + public toggleOldSounds() { + this.useOldSounds = !this.useOldSounds; + } } diff --git a/src/app/views/game/game.component.ts b/src/app/views/game/game.component.ts index d69ebf4..5210427 100644 --- a/src/app/views/game/game.component.ts +++ b/src/app/views/game/game.component.ts @@ -85,6 +85,7 @@ export class GameComponent implements OnInit, OnDestroy { this.registerCommand("mimimihs", this.mimimi_spedup.bind(this)); this.registerCommand("letitsnow", this.toggleSnowflakes.bind(this)); this.registerCommand("30305244", this.benjamin.bind(this)); + this.registerCommand("oldsounds", this.oldSounds.bind(this)); } ngOnDestroy(): void { @@ -235,6 +236,10 @@ export class GameComponent implements OnInit, OnDestroy { this.sound.play("benjamin"); } + oldSounds() { + this.gameService.toggleOldSounds(); + } + playIDLSound() { this.lastKeyPressTimeStamp = new Date().getTime(); this.sound.play("tryk_paa_den_lange_tast"); diff --git a/src/assets/sounds/old/C-10.mp3 b/src/assets/sounds/old/C-10.mp3 new file mode 100644 index 0000000..2226fe7 Binary files /dev/null and b/src/assets/sounds/old/C-10.mp3 differ diff --git a/src/assets/sounds/old/C-10.ogg b/src/assets/sounds/old/C-10.ogg new file mode 100644 index 0000000..b233b4a Binary files /dev/null and b/src/assets/sounds/old/C-10.ogg differ diff --git a/src/assets/sounds/old/C-11.mp3 b/src/assets/sounds/old/C-11.mp3 new file mode 100644 index 0000000..b42679f Binary files /dev/null and b/src/assets/sounds/old/C-11.mp3 differ diff --git a/src/assets/sounds/old/C-11.ogg b/src/assets/sounds/old/C-11.ogg new file mode 100644 index 0000000..47d7a64 Binary files /dev/null and b/src/assets/sounds/old/C-11.ogg differ diff --git a/src/assets/sounds/old/C-12.mp3 b/src/assets/sounds/old/C-12.mp3 new file mode 100644 index 0000000..298f6ea Binary files /dev/null and b/src/assets/sounds/old/C-12.mp3 differ diff --git a/src/assets/sounds/old/C-12.ogg b/src/assets/sounds/old/C-12.ogg new file mode 100644 index 0000000..7e70ad0 Binary files /dev/null and b/src/assets/sounds/old/C-12.ogg differ diff --git a/src/assets/sounds/old/C-13.mp3 b/src/assets/sounds/old/C-13.mp3 new file mode 100644 index 0000000..9a83461 Binary files /dev/null and b/src/assets/sounds/old/C-13.mp3 differ diff --git a/src/assets/sounds/old/C-13.ogg b/src/assets/sounds/old/C-13.ogg new file mode 100644 index 0000000..b779901 Binary files /dev/null and b/src/assets/sounds/old/C-13.ogg differ diff --git a/src/assets/sounds/old/C-2.mp3 b/src/assets/sounds/old/C-2.mp3 new file mode 100644 index 0000000..f6120fd Binary files /dev/null and b/src/assets/sounds/old/C-2.mp3 differ diff --git a/src/assets/sounds/old/C-2.ogg b/src/assets/sounds/old/C-2.ogg new file mode 100644 index 0000000..1f287ad Binary files /dev/null and b/src/assets/sounds/old/C-2.ogg differ diff --git a/src/assets/sounds/old/C-3.mp3 b/src/assets/sounds/old/C-3.mp3 new file mode 100644 index 0000000..8ad7124 Binary files /dev/null and b/src/assets/sounds/old/C-3.mp3 differ diff --git a/src/assets/sounds/old/C-3.ogg b/src/assets/sounds/old/C-3.ogg new file mode 100644 index 0000000..b41f0a6 Binary files /dev/null and b/src/assets/sounds/old/C-3.ogg differ diff --git a/src/assets/sounds/old/C-4.mp3 b/src/assets/sounds/old/C-4.mp3 new file mode 100644 index 0000000..4a11f47 Binary files /dev/null and b/src/assets/sounds/old/C-4.mp3 differ diff --git a/src/assets/sounds/old/C-4.ogg b/src/assets/sounds/old/C-4.ogg new file mode 100644 index 0000000..77ae157 Binary files /dev/null and b/src/assets/sounds/old/C-4.ogg differ diff --git a/src/assets/sounds/old/C-5.mp3 b/src/assets/sounds/old/C-5.mp3 new file mode 100644 index 0000000..e224c03 Binary files /dev/null and b/src/assets/sounds/old/C-5.mp3 differ diff --git a/src/assets/sounds/old/C-5.ogg b/src/assets/sounds/old/C-5.ogg new file mode 100644 index 0000000..8cc1b0f Binary files /dev/null and b/src/assets/sounds/old/C-5.ogg differ diff --git a/src/assets/sounds/old/C-6.mp3 b/src/assets/sounds/old/C-6.mp3 new file mode 100644 index 0000000..a333815 Binary files /dev/null and b/src/assets/sounds/old/C-6.mp3 differ diff --git a/src/assets/sounds/old/C-6.ogg b/src/assets/sounds/old/C-6.ogg new file mode 100644 index 0000000..70d8d77 Binary files /dev/null and b/src/assets/sounds/old/C-6.ogg differ diff --git a/src/assets/sounds/old/C-7.mp3 b/src/assets/sounds/old/C-7.mp3 new file mode 100644 index 0000000..78b760a Binary files /dev/null and b/src/assets/sounds/old/C-7.mp3 differ diff --git a/src/assets/sounds/old/C-7.ogg b/src/assets/sounds/old/C-7.ogg new file mode 100644 index 0000000..33990f9 Binary files /dev/null and b/src/assets/sounds/old/C-7.ogg differ diff --git a/src/assets/sounds/old/C-8.mp3 b/src/assets/sounds/old/C-8.mp3 new file mode 100644 index 0000000..422b10e Binary files /dev/null and b/src/assets/sounds/old/C-8.mp3 differ diff --git a/src/assets/sounds/old/C-8.ogg b/src/assets/sounds/old/C-8.ogg new file mode 100644 index 0000000..52b1493 Binary files /dev/null and b/src/assets/sounds/old/C-8.ogg differ diff --git a/src/assets/sounds/old/C-9.mp3 b/src/assets/sounds/old/C-9.mp3 new file mode 100644 index 0000000..1717dbd Binary files /dev/null and b/src/assets/sounds/old/C-9.mp3 differ diff --git a/src/assets/sounds/old/C-9.ogg b/src/assets/sounds/old/C-9.ogg new file mode 100644 index 0000000..4abd261 Binary files /dev/null and b/src/assets/sounds/old/C-9.ogg differ diff --git a/src/assets/sounds/old/D-10.mp3 b/src/assets/sounds/old/D-10.mp3 new file mode 100644 index 0000000..0923450 Binary files /dev/null and b/src/assets/sounds/old/D-10.mp3 differ diff --git a/src/assets/sounds/old/D-10.ogg b/src/assets/sounds/old/D-10.ogg new file mode 100644 index 0000000..b852f69 Binary files /dev/null and b/src/assets/sounds/old/D-10.ogg differ diff --git a/src/assets/sounds/old/D-11.mp3 b/src/assets/sounds/old/D-11.mp3 new file mode 100644 index 0000000..c76ac19 Binary files /dev/null and b/src/assets/sounds/old/D-11.mp3 differ diff --git a/src/assets/sounds/old/D-11.ogg b/src/assets/sounds/old/D-11.ogg new file mode 100644 index 0000000..8c7a7a8 Binary files /dev/null and b/src/assets/sounds/old/D-11.ogg differ diff --git a/src/assets/sounds/old/D-12.mp3 b/src/assets/sounds/old/D-12.mp3 new file mode 100644 index 0000000..d1aba92 Binary files /dev/null and b/src/assets/sounds/old/D-12.mp3 differ diff --git a/src/assets/sounds/old/D-12.ogg b/src/assets/sounds/old/D-12.ogg new file mode 100644 index 0000000..fdc68f7 Binary files /dev/null and b/src/assets/sounds/old/D-12.ogg differ diff --git a/src/assets/sounds/old/D-13.mp3 b/src/assets/sounds/old/D-13.mp3 new file mode 100644 index 0000000..d271ff0 Binary files /dev/null and b/src/assets/sounds/old/D-13.mp3 differ diff --git a/src/assets/sounds/old/D-13.ogg b/src/assets/sounds/old/D-13.ogg new file mode 100644 index 0000000..f8123cb Binary files /dev/null and b/src/assets/sounds/old/D-13.ogg differ diff --git a/src/assets/sounds/old/D-2.mp3 b/src/assets/sounds/old/D-2.mp3 new file mode 100644 index 0000000..9d85d38 Binary files /dev/null and b/src/assets/sounds/old/D-2.mp3 differ diff --git a/src/assets/sounds/old/D-2.ogg b/src/assets/sounds/old/D-2.ogg new file mode 100644 index 0000000..1e51dc1 Binary files /dev/null and b/src/assets/sounds/old/D-2.ogg differ diff --git a/src/assets/sounds/old/D-3.mp3 b/src/assets/sounds/old/D-3.mp3 new file mode 100644 index 0000000..0dee4a1 Binary files /dev/null and b/src/assets/sounds/old/D-3.mp3 differ diff --git a/src/assets/sounds/old/D-3.ogg b/src/assets/sounds/old/D-3.ogg new file mode 100644 index 0000000..0bdc238 Binary files /dev/null and b/src/assets/sounds/old/D-3.ogg differ diff --git a/src/assets/sounds/old/D-4.mp3 b/src/assets/sounds/old/D-4.mp3 new file mode 100644 index 0000000..54cb0ce Binary files /dev/null and b/src/assets/sounds/old/D-4.mp3 differ diff --git a/src/assets/sounds/old/D-4.ogg b/src/assets/sounds/old/D-4.ogg new file mode 100644 index 0000000..7ae1a92 Binary files /dev/null and b/src/assets/sounds/old/D-4.ogg differ diff --git a/src/assets/sounds/old/D-5.mp3 b/src/assets/sounds/old/D-5.mp3 new file mode 100644 index 0000000..75e9fe4 Binary files /dev/null and b/src/assets/sounds/old/D-5.mp3 differ diff --git a/src/assets/sounds/old/D-5.ogg b/src/assets/sounds/old/D-5.ogg new file mode 100644 index 0000000..4063da6 Binary files /dev/null and b/src/assets/sounds/old/D-5.ogg differ diff --git a/src/assets/sounds/old/D-6.mp3 b/src/assets/sounds/old/D-6.mp3 new file mode 100644 index 0000000..f54d501 Binary files /dev/null and b/src/assets/sounds/old/D-6.mp3 differ diff --git a/src/assets/sounds/old/D-6.ogg b/src/assets/sounds/old/D-6.ogg new file mode 100644 index 0000000..6990001 Binary files /dev/null and b/src/assets/sounds/old/D-6.ogg differ diff --git a/src/assets/sounds/old/D-7.mp3 b/src/assets/sounds/old/D-7.mp3 new file mode 100644 index 0000000..81b470e Binary files /dev/null and b/src/assets/sounds/old/D-7.mp3 differ diff --git a/src/assets/sounds/old/D-7.ogg b/src/assets/sounds/old/D-7.ogg new file mode 100644 index 0000000..6b7c6a9 Binary files /dev/null and b/src/assets/sounds/old/D-7.ogg differ diff --git a/src/assets/sounds/old/D-8.mp3 b/src/assets/sounds/old/D-8.mp3 new file mode 100644 index 0000000..6420cd0 Binary files /dev/null and b/src/assets/sounds/old/D-8.mp3 differ diff --git a/src/assets/sounds/old/D-8.ogg b/src/assets/sounds/old/D-8.ogg new file mode 100644 index 0000000..bb7dcdc Binary files /dev/null and b/src/assets/sounds/old/D-8.ogg differ diff --git a/src/assets/sounds/old/D-9.mp3 b/src/assets/sounds/old/D-9.mp3 new file mode 100644 index 0000000..4851226 Binary files /dev/null and b/src/assets/sounds/old/D-9.mp3 differ diff --git a/src/assets/sounds/old/D-9.ogg b/src/assets/sounds/old/D-9.ogg new file mode 100644 index 0000000..62d15ab Binary files /dev/null and b/src/assets/sounds/old/D-9.ogg differ diff --git a/src/assets/sounds/old/H-10.mp3 b/src/assets/sounds/old/H-10.mp3 new file mode 100644 index 0000000..928d38c Binary files /dev/null and b/src/assets/sounds/old/H-10.mp3 differ diff --git a/src/assets/sounds/old/H-10.ogg b/src/assets/sounds/old/H-10.ogg new file mode 100644 index 0000000..9bf8bdd Binary files /dev/null and b/src/assets/sounds/old/H-10.ogg differ diff --git a/src/assets/sounds/old/H-11.mp3 b/src/assets/sounds/old/H-11.mp3 new file mode 100644 index 0000000..1e6fc5b Binary files /dev/null and b/src/assets/sounds/old/H-11.mp3 differ diff --git a/src/assets/sounds/old/H-11.ogg b/src/assets/sounds/old/H-11.ogg new file mode 100644 index 0000000..497f42c Binary files /dev/null and b/src/assets/sounds/old/H-11.ogg differ diff --git a/src/assets/sounds/old/H-12.mp3 b/src/assets/sounds/old/H-12.mp3 new file mode 100644 index 0000000..a8f874b Binary files /dev/null and b/src/assets/sounds/old/H-12.mp3 differ diff --git a/src/assets/sounds/old/H-12.ogg b/src/assets/sounds/old/H-12.ogg new file mode 100644 index 0000000..9b64285 Binary files /dev/null and b/src/assets/sounds/old/H-12.ogg differ diff --git a/src/assets/sounds/old/H-13.mp3 b/src/assets/sounds/old/H-13.mp3 new file mode 100644 index 0000000..b5d41bf Binary files /dev/null and b/src/assets/sounds/old/H-13.mp3 differ diff --git a/src/assets/sounds/old/H-13.ogg b/src/assets/sounds/old/H-13.ogg new file mode 100644 index 0000000..3849dc3 Binary files /dev/null and b/src/assets/sounds/old/H-13.ogg differ diff --git a/src/assets/sounds/old/H-2.mp3 b/src/assets/sounds/old/H-2.mp3 new file mode 100644 index 0000000..a7e18e0 Binary files /dev/null and b/src/assets/sounds/old/H-2.mp3 differ diff --git a/src/assets/sounds/old/H-2.ogg b/src/assets/sounds/old/H-2.ogg new file mode 100644 index 0000000..96b7460 Binary files /dev/null and b/src/assets/sounds/old/H-2.ogg differ diff --git a/src/assets/sounds/old/H-3.mp3 b/src/assets/sounds/old/H-3.mp3 new file mode 100644 index 0000000..05e0de6 Binary files /dev/null and b/src/assets/sounds/old/H-3.mp3 differ diff --git a/src/assets/sounds/old/H-3.ogg b/src/assets/sounds/old/H-3.ogg new file mode 100644 index 0000000..fbee28e Binary files /dev/null and b/src/assets/sounds/old/H-3.ogg differ diff --git a/src/assets/sounds/old/H-4.mp3 b/src/assets/sounds/old/H-4.mp3 new file mode 100644 index 0000000..d462e55 Binary files /dev/null and b/src/assets/sounds/old/H-4.mp3 differ diff --git a/src/assets/sounds/old/H-4.ogg b/src/assets/sounds/old/H-4.ogg new file mode 100644 index 0000000..2b2a3d2 Binary files /dev/null and b/src/assets/sounds/old/H-4.ogg differ diff --git a/src/assets/sounds/old/H-6.mp3 b/src/assets/sounds/old/H-6.mp3 new file mode 100644 index 0000000..16c3742 Binary files /dev/null and b/src/assets/sounds/old/H-6.mp3 differ diff --git a/src/assets/sounds/old/H-6.ogg b/src/assets/sounds/old/H-6.ogg new file mode 100644 index 0000000..861ebb5 Binary files /dev/null and b/src/assets/sounds/old/H-6.ogg differ diff --git a/src/assets/sounds/old/H-7.mp3 b/src/assets/sounds/old/H-7.mp3 new file mode 100644 index 0000000..7f0bf6a Binary files /dev/null and b/src/assets/sounds/old/H-7.mp3 differ diff --git a/src/assets/sounds/old/H-7.ogg b/src/assets/sounds/old/H-7.ogg new file mode 100644 index 0000000..a1fa311 Binary files /dev/null and b/src/assets/sounds/old/H-7.ogg differ diff --git a/src/assets/sounds/old/H-8.mp3 b/src/assets/sounds/old/H-8.mp3 new file mode 100644 index 0000000..b328a97 Binary files /dev/null and b/src/assets/sounds/old/H-8.mp3 differ diff --git a/src/assets/sounds/old/H-8.ogg b/src/assets/sounds/old/H-8.ogg new file mode 100644 index 0000000..12d7436 Binary files /dev/null and b/src/assets/sounds/old/H-8.ogg differ diff --git a/src/assets/sounds/old/H-9.mp3 b/src/assets/sounds/old/H-9.mp3 new file mode 100644 index 0000000..ffc83be Binary files /dev/null and b/src/assets/sounds/old/H-9.mp3 differ diff --git a/src/assets/sounds/old/H-9.ogg b/src/assets/sounds/old/H-9.ogg new file mode 100644 index 0000000..8415f16 Binary files /dev/null and b/src/assets/sounds/old/H-9.ogg differ diff --git a/src/assets/sounds/old/S-10.mp3 b/src/assets/sounds/old/S-10.mp3 new file mode 100644 index 0000000..e67755d Binary files /dev/null and b/src/assets/sounds/old/S-10.mp3 differ diff --git a/src/assets/sounds/old/S-10.ogg b/src/assets/sounds/old/S-10.ogg new file mode 100644 index 0000000..3b0fb97 Binary files /dev/null and b/src/assets/sounds/old/S-10.ogg differ diff --git a/src/assets/sounds/old/S-11.mp3 b/src/assets/sounds/old/S-11.mp3 new file mode 100644 index 0000000..49aa085 Binary files /dev/null and b/src/assets/sounds/old/S-11.mp3 differ diff --git a/src/assets/sounds/old/S-11.ogg b/src/assets/sounds/old/S-11.ogg new file mode 100644 index 0000000..334885f Binary files /dev/null and b/src/assets/sounds/old/S-11.ogg differ diff --git a/src/assets/sounds/old/S-12.mp3 b/src/assets/sounds/old/S-12.mp3 new file mode 100644 index 0000000..dd11db9 Binary files /dev/null and b/src/assets/sounds/old/S-12.mp3 differ diff --git a/src/assets/sounds/old/S-12.ogg b/src/assets/sounds/old/S-12.ogg new file mode 100644 index 0000000..6d92fa7 Binary files /dev/null and b/src/assets/sounds/old/S-12.ogg differ diff --git a/src/assets/sounds/old/S-13.mp3 b/src/assets/sounds/old/S-13.mp3 new file mode 100644 index 0000000..89d595e Binary files /dev/null and b/src/assets/sounds/old/S-13.mp3 differ diff --git a/src/assets/sounds/old/S-13.ogg b/src/assets/sounds/old/S-13.ogg new file mode 100644 index 0000000..d4fa9e0 Binary files /dev/null and b/src/assets/sounds/old/S-13.ogg differ diff --git a/src/assets/sounds/old/S-2.mp3 b/src/assets/sounds/old/S-2.mp3 new file mode 100644 index 0000000..ada16f1 Binary files /dev/null and b/src/assets/sounds/old/S-2.mp3 differ diff --git a/src/assets/sounds/old/S-2.ogg b/src/assets/sounds/old/S-2.ogg new file mode 100644 index 0000000..0029d41 Binary files /dev/null and b/src/assets/sounds/old/S-2.ogg differ diff --git a/src/assets/sounds/old/S-3.mp3 b/src/assets/sounds/old/S-3.mp3 new file mode 100644 index 0000000..848953b Binary files /dev/null and b/src/assets/sounds/old/S-3.mp3 differ diff --git a/src/assets/sounds/old/S-3.ogg b/src/assets/sounds/old/S-3.ogg new file mode 100644 index 0000000..0d2c352 Binary files /dev/null and b/src/assets/sounds/old/S-3.ogg differ diff --git a/src/assets/sounds/old/S-4.mp3 b/src/assets/sounds/old/S-4.mp3 new file mode 100644 index 0000000..2a13723 Binary files /dev/null and b/src/assets/sounds/old/S-4.mp3 differ diff --git a/src/assets/sounds/old/S-4.ogg b/src/assets/sounds/old/S-4.ogg new file mode 100644 index 0000000..fdb99bb Binary files /dev/null and b/src/assets/sounds/old/S-4.ogg differ diff --git a/src/assets/sounds/old/S-5.mp3 b/src/assets/sounds/old/S-5.mp3 new file mode 100644 index 0000000..7d27cd7 Binary files /dev/null and b/src/assets/sounds/old/S-5.mp3 differ diff --git a/src/assets/sounds/old/S-5.ogg b/src/assets/sounds/old/S-5.ogg new file mode 100644 index 0000000..4077d78 Binary files /dev/null and b/src/assets/sounds/old/S-5.ogg differ diff --git a/src/assets/sounds/old/S-6.mp3 b/src/assets/sounds/old/S-6.mp3 new file mode 100644 index 0000000..bafe36f Binary files /dev/null and b/src/assets/sounds/old/S-6.mp3 differ diff --git a/src/assets/sounds/old/S-6.ogg b/src/assets/sounds/old/S-6.ogg new file mode 100644 index 0000000..dddde99 Binary files /dev/null and b/src/assets/sounds/old/S-6.ogg differ diff --git a/src/assets/sounds/old/S-7.mp3 b/src/assets/sounds/old/S-7.mp3 new file mode 100644 index 0000000..8091407 Binary files /dev/null and b/src/assets/sounds/old/S-7.mp3 differ diff --git a/src/assets/sounds/old/S-7.ogg b/src/assets/sounds/old/S-7.ogg new file mode 100644 index 0000000..ae057e3 Binary files /dev/null and b/src/assets/sounds/old/S-7.ogg differ diff --git a/src/assets/sounds/old/S-8.mp3 b/src/assets/sounds/old/S-8.mp3 new file mode 100644 index 0000000..d4edb3a Binary files /dev/null and b/src/assets/sounds/old/S-8.mp3 differ diff --git a/src/assets/sounds/old/S-8.ogg b/src/assets/sounds/old/S-8.ogg new file mode 100644 index 0000000..f5617e8 Binary files /dev/null and b/src/assets/sounds/old/S-8.ogg differ diff --git a/src/assets/sounds/old/S-9.mp3 b/src/assets/sounds/old/S-9.mp3 new file mode 100644 index 0000000..42da5b9 Binary files /dev/null and b/src/assets/sounds/old/S-9.mp3 differ diff --git a/src/assets/sounds/old/S-9.ogg b/src/assets/sounds/old/S-9.ogg new file mode 100644 index 0000000..03c668a Binary files /dev/null and b/src/assets/sounds/old/S-9.ogg differ