Questions tagged [dice]

Dice are small objects thrown by hand that land in different positions, used to generate random value for games, particularly gambling.

A die (plural dice) is a small object (most commonly a cube) designed to be thrown onto a surface. Markings on the face of the die chosen by how it lands indicate a value that is thereby chosen randomly. Dice have been used for centuries--even longer than playing cards--for gambling and other games.

882 questions
-4
votes
2 answers

Forbids comparing pointer with integer?

I'm coding a game of farkle, and I run into this problem even though all but two of my if statements are bools. Also, how would I go about letting a user roll specific dice? BloodshedDev/othre IDEs seem to not be working in windows 8 yet, so I'm…
user2320765
  • 1
  • 1
  • 1
-4
votes
1 answer

My code used to work but won't now

So I made this code awhile ago, and it worked then, but now it won't. Can someone tell me what's wrong? What the code does is simple: I take a weapon damage value from a Fallout game (averaging the value first if FO1/FO2/FOT), tell it what game it's…
-4
votes
1 answer

Beginner Here Rand in c

im a 1st grader when it comes to c and need help with storing 5 random values in an array and outputting them. Heres where am at. #include #include #include struct score_card {int A_ones; int B_twos; int C_threes; int…
Fuadk1
  • 1
  • 1
-4
votes
2 answers

Dice Roll Game. Histogram?

Need help creating a vertical histogram with "#" for the number of rolls I get. It will have a max of 80 characters. This is what I have so far. I can get everything to print the way I need it to except I'm having a lot of trouble with my…
user3040301
  • 39
  • 2
  • 9
-4
votes
3 answers

Frequency of Dice Rolls

The Question: Find the frequency of dice rolls (meaning what number is rolled) for 600 dice rolls. This is the code that I have so far, and I seem to be stuck somewhere, but I just can't figure out where the error is located; if someone could help…
-5
votes
1 answer

C++ dice rolling and graph

#include #include #include #include using namespace std; int main() { const int arraysize = 13; string n; int counter[13]; double sum=0; // init counter for (int i = 0; i < 13; i++) …
-5
votes
2 answers

Assigning a variable name to a function in Python 3

So I'm writing a program that, once finished, will have a user roll 2 dice and then keep a running sum of the values shown and assign some points to the values that are rolled, but I am running into a problem when first getting started. This is…
AngusOld
  • 43
  • 1
  • 7
-5
votes
1 answer

Permutations of integers in Java

I have to list all permutations of given 3 integers, before I start - I did look for it online, but I didnt find anything that fits my needs. I need to find all permutations of three, six sided die. I have a bet going on with a friend and my…
iSoda
  • 23
  • 5
-5
votes
1 answer

Basic Java dice representation

I'm trying to make a representation of a dice in Java with a given classes(Square, Circle and Canvas), I have represent the box of the dice with the square but at the time of represent the n circles I have made a Circle matrix, but it doesn't…
-5
votes
1 answer

Java dice random numbers

I posted about this yesterday, but I think I need to make it less involved. I have absolutely no Java experience, and I need to work on this "Dice" program. I've done it twice already, but clearly I still have no idea what I'm doing. I've also been…
user3530332
  • 1
  • 1
  • 1
  • 3
-7
votes
1 answer

May someone help create a PairOfDice class using the Die.java

I think my issue is with the PairOfDice class because I need to only use an object containing both dice values in the EyesHaveIt class. I keep getting errors like: PairOfDice.java:16: error: class, interface, or enum expected public int…
-7
votes
2 answers

Beginner Java Programming - Rolling 2 Dice Game

I'm trying to create a java program for my class that throws 3 dice. The player rolls the dice and earns a profit in dollars based on the three values obtained. In particular, the profit is equal to the number of even values multiplied by the sum of…
Troy
  • 11
  • 2
1 2 3
58
59