Skip to main content

Questions tagged [dice]

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

4 votes
2 answers
2k views

Making a dice game as my first Python project!

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
  • 41
0 votes
1 answer
343 views

Dice roll game with arbitrary face count

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
592 views

Dice league, putting players against each other

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

Random dice class based off D&D

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

DnD Die in Java with regex

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
  • 2,838
9 votes
3 answers
5k views

Two player dice roll game

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
3 votes
1 answer
364 views

Tricky dice game in Python

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
  • 45
4 votes
3 answers
1k views

This code is a non-static C# class for rolling a number of dice

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

c++ dice game using random numbers

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

Dice throwing simulation in Java

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
5 votes
2 answers
781 views

NEA Computing Task 2 Dice Game

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
  • 183
3 votes
2 answers
124 views

Dice rolling simulator, any ideas on implementing any features?

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
402 views

Vue component for Game Die (dice)

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
50 views

Frequency analysis for simultaneous dice rolls - follow-up

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

Frequency analysis for simultaneous dice rolls

My professor told me to optimize my perl code, but he wouldn't tell me what exactly - just make it simpler. I changed some little things but nothing major. Am I missing something? The task was: ...
alec's user avatar
  • 131

15 30 50 per page
1
2 3 4 5
12