remove comments and add note

This commit is contained in:
Face 2025-06-24 13:00:59 +03:00
parent af18d7f423
commit c110fdf83a
2 changed files with 6 additions and 6 deletions

View file

@ -332,6 +332,9 @@
{calculateProbability(isPlaying ? 1 : 1, mineCount)}%
</span>
</p>
<span class="text-muted-foreground text-xs">
Note: Maximum payout per game is capped at $2,000,000.
</span>
</div>
<div>
<label for="bet-amount" class="mb-2 block text-sm font-medium">Bet Amount</label>

View file

@ -93,15 +93,13 @@ setInterval(async () => {
}
}, 15000);
// Rig the game...
const getMaxPayout = (bet: number, picks: number, mines: number): number => {
const MAX_PAYOUT = 2_000_000; // Maximum payout cap of 2 million to not make linker too rich
const MAX_PAYOUT = 2_000_000;
const HIGH_BET_THRESHOLD = 50_000;
const mineFactor = 1 + (mines / 25);
const baseMultiplier = (1.4 + Math.pow(picks, 0.45)) * mineFactor;
// For high bets, we stop linker from getting richer ¯\_(ツ)_/¯
if (bet > HIGH_BET_THRESHOLD) {
const betRatio = Math.pow(Math.min(1, (bet - HIGH_BET_THRESHOLD) / (MAX_PAYOUT - HIGH_BET_THRESHOLD)), 1);
@ -121,7 +119,6 @@ const getMaxPayout = (bet: number, picks: number, mines: number): number => {
return payout;
};
export function calculateMultiplier(picks: number, mines: number, betAmount: number): number {
const TOTAL_TILES = 25;
const HOUSE_EDGE = 0.05;