Skip to main content

Questions tagged [dice]

Simulations of fair N-sided die tosses and other games of chance involving random number generation.

Filter by
Sorted by
Tagged with
4 votes
5 answers
815 views

I wrote this dice game as beginner practice. This is working code, but I would like to improve it by adding more functions. Though, since I am still a beginner, I don't know how, so help would be ...
cyan's user avatar
  • 149
5 votes
2 answers
3k views

I just started my programming lessons in school today and I decided to start learning more at home. This is my first day and I know the basics of if conditions, <...
Ekwa's user avatar
  • 51
1 vote
1 answer
395 views

I have this code written and I wanted to get a better performance out of it. Could somebody help me please? If possible I would like my code to get a better performance when rolling high numbers and ...
Samuel Molero Badia's user avatar
7 votes
2 answers
663 views

I've got this code: ...
Nils Edström's user avatar
3 votes
2 answers
323 views

I am learning C++ and I took on this small project to get more familiar with OOP. The goal was to create a Die class that randomly rolls and returns a value based on the sides of the die, the number ...
rkmacleod's user avatar
7 votes
7 answers
3k views

For my game I need to roll some values with a die. A die is formally described as: nDs[+a] n amount of die (optional, 1 of not set, zero must be set explicitly) D ...
Martin Frank's user avatar
  • 3,033
9 votes
3 answers
5k views

This is a finished project where 2 players each roll 2 dice. If the sum of the number that a player has rolled is even, then 10 is added to their score; if the sum of their 2 rolls isn't even then 5 ...
Irrelevance's user avatar
5 votes
1 answer
395 views

It's a dice game between 2 people using tricky dice. For example,three dice [[1, 1, 4, 6, 7, 8], [2, 2, 2, 6, 7, 7], [3, 3, 3, 5, 5, 8]]. The code will decide, in order to win, who chooses the dice ...
Chris's user avatar
  • 65
4 votes
3 answers
1k views

Hello Everyone! Fellow human beings, today I present to you my dice rolling script! Behold, in my amateurish attempt at some raw C# code. Perhaps this will remain here regardless of the dozens of ...
Dasein's user avatar
  • 41
7 votes
3 answers
5k views

I'm fairly new to c++ programming. It would be helpful if I could get a feedback on a dice game I wrote. I would really appreciate some tips as well as your opinions. This program will begin by asking ...
Axel Bozic's user avatar
7 votes
3 answers
1k views

For one of my labs I need to write a complete java program which will simulate a "very simple" dice betting game. The specifications are as follows: simulate the throw of 3 dice. If you ...
E's computer class's user avatar
7 votes
2 answers
866 views

I was recently set Task 2 as seen below and I realise someone answer the question on this site here but I wanted a fresh opinion TASK 2: Allows two players to enter their details, which are then ...
Evorage's user avatar
  • 213
3 votes
2 answers
153 views

This is one of my mini project of dice rolling and I want to improve it further with more advanced Python. Maybe you have any ideas to improve the code itself? This code will ask the minimum and ...
ShreddedPumpkin's user avatar
7 votes
1 answer
431 views

As part of learning Vue and Vue Test Utils I develop some simple games. I made a simple version of craps. Because in many other games a die (or dice) is used, I decided to create a reusable component <...
cezar's user avatar
  • 262
3 votes
1 answer
75 views

I had another question for my Perl class assignment. Related question: Frequency analysis for simultaneous dice rolls ...
alec's user avatar
  • 131

15 30 50 per page
1
2 3 4 5
12