Merge pull request #2784 from dwRchyngqxs/blackjack_precise_decks

Add the deck count for blackjack
This commit is contained in:
hydroflame 2022-01-26 00:48:42 -05:00 committed by GitHub
commit ac9381e30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

@ -14,6 +14,7 @@ import Typography from "@mui/material/Typography";
import TextField from "@mui/material/TextField"; import TextField from "@mui/material/TextField";
const MAX_BET = 100e6; const MAX_BET = 100e6;
export const DECK_COUNT = 5; // 5-deck multideck
enum Result { enum Result {
Pending = "", Pending = "",
@ -45,7 +46,7 @@ export class Blackjack extends Game<Props, State> {
constructor(props: Props) { constructor(props: Props) {
super(props); super(props);
this.deck = new Deck(5); // 5-deck multideck this.deck = new Deck(DECK_COUNT);
const initialBet = 1e6; const initialBet = 1e6;

@ -5,7 +5,7 @@
*/ */
import React, { useState } from "react"; import React, { useState } from "react";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import { Blackjack } from "../../Casino/Blackjack"; import { Blackjack, DECK_COUNT } from "../../Casino/Blackjack";
import { CoinFlip } from "../../Casino/CoinFlip"; import { CoinFlip } from "../../Casino/CoinFlip";
import { Roulette } from "../../Casino/Roulette"; import { Roulette } from "../../Casino/Roulette";
import { SlotMachine } from "../../Casino/SlotMachine"; import { SlotMachine } from "../../Casino/SlotMachine";
@ -38,7 +38,7 @@ export function CasinoLocation(props: IProps): React.ReactElement {
<Button onClick={() => updateGame(GameType.Coin)}>Play coin flip</Button> <Button onClick={() => updateGame(GameType.Coin)}>Play coin flip</Button>
<Button onClick={() => updateGame(GameType.Slots)}>Play slots</Button> <Button onClick={() => updateGame(GameType.Slots)}>Play slots</Button>
<Button onClick={() => updateGame(GameType.Roulette)}>Play roulette</Button> <Button onClick={() => updateGame(GameType.Roulette)}>Play roulette</Button>
<Button onClick={() => updateGame(GameType.Blackjack)}>Play blackjack</Button> <Button onClick={() => updateGame(GameType.Blackjack)}>Play blackjack ({DECK_COUNT} decks)</Button>
</Box> </Box>
)} )}
{game !== GameType.None && ( {game !== GameType.None && (