Questions tagged [gambling]

For questions about programming gambling games.

47 questions
10
votes
3 answers

Dice odds: Simulating a game of Craps

My brother turns 21 in a couple of weeks and my parents and I are taking him to Las Vegas. For my 21st, I brought $200 to gamble in Vegas and came home with around $450, mostly from playing craps. I plan on bringing $200 again for this trip and…
Kevin
  • 3,771
  • 2
  • 31
  • 40
9
votes
0 answers

Dog Racing Game algorithm logic

This is a dog racing game, there are videos and the first 3 winners are known for each video, the players choose the winners within a X limit time. Based on their betting the algorithm chooses the proper video to keep the returning percentage of…
daniel
  • 1,152
  • 2
  • 15
  • 33
6
votes
2 answers

Calculating slot machine payout

A slot machine has 5 reels and displays 3 symbols per reel (no spaces or "empty" symbols). Payout can occur in a number of ways. Some examples... A special diamond symbol appears 3 Lucky 7's appear All five symbols in the payline are identical All…
benny.bennett
  • 700
  • 1
  • 8
  • 25
4
votes
2 answers

Creating and retrieving data in JSON format

I am making a program that allows you gamble and it creates an object of the player with attributes like current money, how many wins/losses the player has etc.. I am currently able to have this working and the information is saved while the program…
4
votes
5 answers

Squid game Episode 7 with simulation

Last night I saw the episode 7 of the Squid game tv series. The episode has a game with binomial distribution in the bridge. Specifically there are 16 players and a bridge with 18 pair of glasses (one pure glass and one safe glass).If one player…
Homer Jay Simpson
  • 1,043
  • 6
  • 19
4
votes
2 answers

slot machine payout calculation

I want to create a 5 reels slot machine calculation system and I'm not sure what approach to take. I understand that there is a lot of math within it, especially if I want the machine to be enjoyable to a player. Are there any tips/links for that?…
Poni
  • 11,061
  • 25
  • 80
  • 121
4
votes
2 answers

Integer Payout Function (insert "expected" value, output a distribution maximized for "fun")

We have several instances in our game where we want to randomize a "payout" given an expected value of output. For instance, instead of rewarding "10 credits" every single time we would want to reward an average of 10 over the long run with some…
Brad Dwyer
  • 6,305
  • 8
  • 48
  • 68
3
votes
1 answer

Math behind generating random number (Crash game BTC Casino)

I'm working on a web based game where we have multiple minigames. We're insisting on also adding a Crash game, which is pretty popular in the gambling world. However we have been struggling to understand the concept of generating a random (almost…
sneaker
  • 49
  • 2
  • 8
3
votes
1 answer

Calculating a winner, depending on win chance of each player

My Goal: Each player has an option to place a bet, and for each player the winning chance of their bet would be calculated and displayed on the web page. So as an example if player 1 bets 5000 credits and the total pot is 15000 credits, player 1 has…
Dax
  • 767
  • 4
  • 11
  • 29
3
votes
1 answer

runif() is not uniform

I'm writing a roulette simulator and I stuck just on the beginning. I wanted to draw integer from 0 to 36, so I used runif(). I noticed that 0's are outstanding. Have a look: n=1000000 x=floor(runif(n,0,37)) hist(x,breaks=37) To remove "0's" i…
KryptonLC
  • 70
  • 9
2
votes
2 answers

Slot machine Random generator

So, I saw this. How are actually these random numbers generated, and how are they actually translated further on? I was planning to make a basic slot machine, but have no idea where to start. Well, I had an idea to use something like random_number_1…
maria
  • 207
  • 5
  • 22
  • 56
2
votes
3 answers

Assigning int value to string

I'm designing a Black Jack program. My issue is that, I use a switch case to generate a random card. But when it comes time to compare the value of the cards....lets say if(pCard1 + pCard2 > 21) it's not allowing me to compare them because they are…
PizzaParrot
  • 121
  • 8
2
votes
1 answer

Online Payment System - Lottery Application (Stripe Prohibited Businesses) alternative?

Basically I was looking to use stripe to take online payments for an online lottery website however the application is marked as a prohibited business. Prohibited Businesses: Gambling Lotteries; bidding fee auctions; sports forecasting or odds…
Ryan
  • 991
  • 6
  • 10
2
votes
4 answers

Simple Java Racing Game

I'm new to Java, I've been learning for about a month. One of the projects in class is to write a program where you bet on "horse" "races." Here's the code: import java.util.Scanner; import java.util.Random; public class horsies { public static…
Panah Neshati
  • 23
  • 1
  • 5
1
vote
2 answers

Doing the inverse of a calculation

For me to know how much I need to invest knowing how much I want in return, I do it this way: Return expected → D2: 7.32 Market odds → C2: 1.41 Amount to invest → E2: =(C2-1)*D2 Rounded result: 3.00 But what if I know how much I want to…
Digital Farmer
  • 1,705
  • 5
  • 17
  • 67
1
2 3 4