From 23cd53aad4c3c55ad081724d83a450dda1ce2cbe Mon Sep 17 00:00:00 2001 From: qcorradi Date: Sun, 23 Jan 2022 21:13:11 +0100 Subject: [PATCH] Add the deck count for blackjack --- src/Casino/Blackjack.tsx | 3 ++- src/Locations/ui/CasinoLocation.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Casino/Blackjack.tsx b/src/Casino/Blackjack.tsx index 834138f37..542989e0d 100644 --- a/src/Casino/Blackjack.tsx +++ b/src/Casino/Blackjack.tsx @@ -14,6 +14,7 @@ import Typography from "@mui/material/Typography"; import TextField from "@mui/material/TextField"; const MAX_BET = 100e6; +export const DECK_COUNT = 5; // 5-deck multideck enum Result { Pending = "", @@ -45,7 +46,7 @@ export class Blackjack extends Game { constructor(props: Props) { super(props); - this.deck = new Deck(5); // 5-deck multideck + this.deck = new Deck(DECK_COUNT); const initialBet = 1e6; diff --git a/src/Locations/ui/CasinoLocation.tsx b/src/Locations/ui/CasinoLocation.tsx index 096946b17..0058b7e2d 100644 --- a/src/Locations/ui/CasinoLocation.tsx +++ b/src/Locations/ui/CasinoLocation.tsx @@ -5,7 +5,7 @@ */ import React, { useState } from "react"; import Button from "@mui/material/Button"; -import { Blackjack } from "../../Casino/Blackjack"; +import { Blackjack, DECK_COUNT } from "../../Casino/Blackjack"; import { CoinFlip } from "../../Casino/CoinFlip"; import { Roulette } from "../../Casino/Roulette"; import { SlotMachine } from "../../Casino/SlotMachine"; @@ -38,7 +38,7 @@ export function CasinoLocation(props: IProps): React.ReactElement { - + )} {game !== GameType.None && (