@devrongx/games 0.4.22 → 0.4.24
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.
package/package.json
CHANGED
|
@@ -106,6 +106,7 @@ export const PreMatchGame = ({ config, bets, onBetsChange, onOptionClick, onAmou
|
|
|
106
106
|
// Derived from unified state
|
|
107
107
|
const parlayGroups = useMemo(() => deriveParlayGroups(bets), [bets]);
|
|
108
108
|
const marketToParlay = useMemo(() => deriveMarketToParlay(bets), [bets]);
|
|
109
|
+
const hasAnyParlays = Object.keys(parlayGroups).length > 0;
|
|
109
110
|
|
|
110
111
|
// Toggle a market in/out of the currently editing parlay.
|
|
111
112
|
// A market already in a DIFFERENT parlay cannot be toggled — UI prevents this.
|
|
@@ -695,11 +696,15 @@ export const PreMatchGame = ({ config, bets, onBetsChange, onOptionClick, onAmou
|
|
|
695
696
|
animate={{ opacity: 1 }}
|
|
696
697
|
transition={{ duration: 0.4, delay: 3 }}
|
|
697
698
|
>
|
|
698
|
-
{riskPercent >
|
|
699
|
-
? "
|
|
700
|
-
: riskPercent >
|
|
701
|
-
? "
|
|
702
|
-
:
|
|
699
|
+
{riskPercent > 80
|
|
700
|
+
? "Extreme variance — outcomes swing dramatically either way"
|
|
701
|
+
: riskPercent > 60
|
|
702
|
+
? "High variance picks — significant upside and downside"
|
|
703
|
+
: riskPercent > 40
|
|
704
|
+
? "Mixed variance — a blend of safe and risky selections"
|
|
705
|
+
: riskPercent > 20
|
|
706
|
+
? "Mild variance — mostly conservative picks"
|
|
707
|
+
: "Low variance — steady selections with modest returns"
|
|
703
708
|
}
|
|
704
709
|
</motion.p>
|
|
705
710
|
</div>
|
|
@@ -709,18 +714,15 @@ export const PreMatchGame = ({ config, bets, onBetsChange, onOptionClick, onAmou
|
|
|
709
714
|
|
|
710
715
|
{/* Combined Bets (Parlays) */}
|
|
711
716
|
<div className="mt-4">
|
|
717
|
+
{hasAnyParlays ? (
|
|
718
|
+
<>
|
|
712
719
|
<div className="flex items-center gap-2 mb-1">
|
|
713
720
|
<p className="text-[9px] text-white/60 font-semibold uppercase tracking-wider" style={OUTFIT}>
|
|
714
|
-
|
|
721
|
+
Combined Bets
|
|
715
722
|
</p>
|
|
716
|
-
{!parlayEnabled && (
|
|
717
|
-
<span className="text-[7px] font-bold px-1.5 py-0.5 rounded-full" style={{ background: "rgba(153,69,255,0.15)", color: "#9945FF", border: "1px solid rgba(153,69,255,0.3)" }}>
|
|
718
|
-
Coming in v2
|
|
719
|
-
</span>
|
|
720
|
-
)}
|
|
721
723
|
</div>
|
|
722
724
|
<p className="text-[7px] text-white/30 font-medium mb-2.5" style={OUTFIT}>
|
|
723
|
-
|
|
725
|
+
Every leg must hit. One miss and the entire combined bet is lost.
|
|
724
726
|
</p>
|
|
725
727
|
|
|
726
728
|
{/* Parlay slots — concentric circles */}
|
|
@@ -863,6 +865,36 @@ export const PreMatchGame = ({ config, bets, onBetsChange, onOptionClick, onAmou
|
|
|
863
865
|
</button>
|
|
864
866
|
</div>
|
|
865
867
|
)}
|
|
868
|
+
</>
|
|
869
|
+
) : (
|
|
870
|
+
<div className="flex items-center justify-between gap-3">
|
|
871
|
+
<div className="flex-1 min-w-0">
|
|
872
|
+
<p className="text-[18px] font-bold text-white leading-tight" style={OUTFIT}>
|
|
873
|
+
Now combine bets for crazy multipliers
|
|
874
|
+
</p>
|
|
875
|
+
{!parlayEnabled && (
|
|
876
|
+
<span className="inline-block mt-1.5 text-[7px] font-bold px-1.5 py-0.5 rounded-full" style={{ background: "rgba(153,69,255,0.15)", color: "#9945FF", border: "1px solid rgba(153,69,255,0.3)" }}>
|
|
877
|
+
Coming in v2
|
|
878
|
+
</span>
|
|
879
|
+
)}
|
|
880
|
+
</div>
|
|
881
|
+
<button
|
|
882
|
+
onClick={parlayEnabled ? () => setEditingParlay(0) : undefined}
|
|
883
|
+
className="relative w-[65px] min-h-[54px] rounded-xl overflow-hidden flex-shrink-0 flex items-center justify-center py-3"
|
|
884
|
+
style={{
|
|
885
|
+
background: "linear-gradient(135deg, rgba(153,69,255,0.2), rgba(248,60,197,0.2), rgba(34,227,232,0.2))",
|
|
886
|
+
cursor: parlayEnabled ? "pointer" : "default",
|
|
887
|
+
opacity: parlayEnabled ? 1 : 0.5,
|
|
888
|
+
}}
|
|
889
|
+
>
|
|
890
|
+
<div
|
|
891
|
+
className="absolute inset-y-0 left-0 w-[30%]"
|
|
892
|
+
style={{ background: "linear-gradient(135deg, #9945FF, #f83cc5, #22E3E8)" }}
|
|
893
|
+
/>
|
|
894
|
+
<Play size={26} fill="white" strokeWidth={0} className="relative z-10" />
|
|
895
|
+
</button>
|
|
896
|
+
</div>
|
|
897
|
+
)}
|
|
866
898
|
</div>
|
|
867
899
|
</div>
|
|
868
900
|
|
|
@@ -412,7 +412,7 @@ export function calcBetSummary(
|
|
|
412
412
|
config: IChallengeConfig,
|
|
413
413
|
): IBetSummary {
|
|
414
414
|
const { markets, startingBalance } = config;
|
|
415
|
-
const selectedCount = Object.
|
|
415
|
+
const selectedCount = Object.values(bets).filter(b => b.amount > 0).length;
|
|
416
416
|
const compoundMultiplier = config.compoundMultipliers[selectedCount] ?? 1;
|
|
417
417
|
|
|
418
418
|
const parlayGroups = deriveParlayGroups(bets);
|