@betorigami/games 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlackjackOutcome, Rank } from '@betorigami/game-calculations';
|
|
2
|
-
type
|
|
2
|
+
type HandClassParams = {
|
|
3
3
|
outcome: BlackjackOutcome | null;
|
|
4
4
|
isPlayerTurn: boolean;
|
|
5
5
|
handIndex: number;
|
|
@@ -14,5 +14,6 @@ export declare const handDisplayValue: (cards: ReadonlyArray<{
|
|
|
14
14
|
}>) => string;
|
|
15
15
|
export declare const getCardClassFromOutcome: (outcome: BlackjackOutcome | null) => string;
|
|
16
16
|
export declare const getOutcomePillClass: (outcome: BlackjackOutcome | null) => string;
|
|
17
|
-
export declare const getPillClass: (
|
|
17
|
+
export declare const getPillClass: (params: HandClassParams) => string;
|
|
18
|
+
export declare const getHandCardClass: (params: HandClassParams) => string;
|
|
18
19
|
export {};
|
package/dist/index.mjs
CHANGED
|
@@ -11679,6 +11679,10 @@ const Gd = i$a`
|
|
|
11679
11679
|
--card-border-color: var(--warning-color);
|
|
11680
11680
|
}
|
|
11681
11681
|
|
|
11682
|
+
.card--active {
|
|
11683
|
+
--card-border-color: var(--info-color);
|
|
11684
|
+
}
|
|
11685
|
+
|
|
11682
11686
|
.card-inner {
|
|
11683
11687
|
position: relative;
|
|
11684
11688
|
width: 100%;
|
|
@@ -18577,11 +18581,11 @@ const RANK_VALUE = { Ace: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10:
|
|
|
18577
18581
|
default:
|
|
18578
18582
|
return "";
|
|
18579
18583
|
}
|
|
18580
|
-
},
|
|
18581
|
-
if (te === null) return
|
|
18582
|
-
const
|
|
18583
|
-
return
|
|
18584
|
-
}, blackjackContentStyles = i$a`
|
|
18584
|
+
}, isActiveSplitHand = ({ isPlayerTurn: te, handIndex: ae, activeHandIndex: Pe, handCount: Ct }) => te && ae === Pe && Ct > 1, getPillClass = (te) => {
|
|
18585
|
+
if (te.outcome === null) return isActiveSplitHand(te) ? "bj-pill bj-pill--active" : "bj-pill";
|
|
18586
|
+
const ae = getOutcomePillClass(te.outcome);
|
|
18587
|
+
return ae === "" ? "bj-pill" : `bj-pill ${ae}`;
|
|
18588
|
+
}, getHandCardClass = (te) => te.outcome !== null ? getCardClassFromOutcome(te.outcome) : isActiveSplitHand(te) ? "card--active" : "", blackjackContentStyles = i$a`
|
|
18585
18589
|
:host {
|
|
18586
18590
|
width: 100%;
|
|
18587
18591
|
height: 100%;
|
|
@@ -18707,6 +18711,7 @@ const RANK_VALUE = { Ace: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10:
|
|
|
18707
18711
|
|
|
18708
18712
|
.bj-flex-start-around {
|
|
18709
18713
|
display: flex;
|
|
18714
|
+
flex-direction: row-reverse;
|
|
18710
18715
|
align-items: flex-start;
|
|
18711
18716
|
justify-content: center;
|
|
18712
18717
|
|
|
@@ -18776,6 +18781,7 @@ const RANK_VALUE = { Ace: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10:
|
|
|
18776
18781
|
|
|
18777
18782
|
.bj-player-sections {
|
|
18778
18783
|
display: flex;
|
|
18784
|
+
flex-direction: row-reverse;
|
|
18779
18785
|
justify-content: center;
|
|
18780
18786
|
gap: clamp(16px, 4vw, 48px);
|
|
18781
18787
|
flex-wrap: wrap;
|
|
@@ -19018,7 +19024,7 @@ let BlackjackContent = class extends M {
|
|
|
19018
19024
|
|
|
19019
19025
|
<div class="bj-flex-start-around">
|
|
19020
19026
|
${_t.length !== 0 && Ct ? _t.map((Ta, Cs) => {
|
|
19021
|
-
const xs = Ta.filter((Bs, Ms) => this.revealedIds.has(`p-${Cs}-${Ms}`)), Xa = Cs === 0 ? this.resolvedMainHandOutcome : this.resolvedSplitHandOutcome, Za = Xa === null ? handDisplayValue(xs) : handBestValue(xs), As =
|
|
19027
|
+
const xs = Ta.filter((Bs, Ms) => this.revealedIds.has(`p-${Cs}-${Ms}`)), Xa = Cs === 0 ? this.resolvedMainHandOutcome : this.resolvedSplitHandOutcome, Za = Xa === null ? handDisplayValue(xs) : handBestValue(xs), As = getHandCardClass({ outcome: Xa, isPlayerTurn: this.isPlayerTurn, handIndex: Cs, activeHandIndex: this.activeHandIndex, handCount: _t.length });
|
|
19022
19028
|
return b$4`
|
|
19023
19029
|
<div class="bj-flex-col-center">
|
|
19024
19030
|
<div class="bj-row-wrapper">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betorigami/games",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@betorigami/game-calculations": "10.1.0",
|
|
26
|
-
"@betorigami/game-ui-shared": "1.3.
|
|
26
|
+
"@betorigami/game-ui-shared": "1.3.1",
|
|
27
27
|
"@betorigami/game-ui-wheel": "1.1.1",
|
|
28
28
|
"@lit/context": "^1.1.5",
|
|
29
29
|
"big.js": "^7.0.1",
|