dice
craps in python
I\'m trying to simulate n games of craps.The code seems to make sense to me but I never get the right result.For example, if I put in n = 5 i.e. fives games the wins and losses 开发者_StackOverflow社区[详细]
2023-02-16 20:14 分类:问答Rolling Dice Simulation
I have to write a script that uses the user input to roll a certain amount of dice, with a certain amount of sides, with a certain amount of rolls , and a certain amount of trials.[详细]
2023-02-15 19:05 分类:问答assigning a value to an image
So I am trying to create a real simple dice game...more like a dice roller game and I have encountered a problem for which I have yet to find an answer.So obviously I have 6 images for the die faces(1[详细]
2023-02-13 17:09 分类:问答Need some help with a dice rolling algorithm
How would I go about pseudocoding the algorithm for a method that: Rolls a type of Die - 4 , 6 , 8 , 10 , or 12 sided[详细]
2023-02-04 00:58 分类:问答Java setter, getter (rolling a die)
I have some que开发者_C百科stions about java. There are two questions in the code (I left them as comments).[详细]
2023-01-21 13:59 分类:问答Generate a matrix of all possible outcomes for throwing n dice (ignoring order)
In cases where order does matter, it\'s rather easy to generate the matrix of all possible outcomes. One way for doing this is using expand.grid as shown here.[详细]
2022-12-31 03:21 分类:问答Calculating odds distribution with 6-sided dice
I\'m trying to calculate the odds distribution of a changing number of 6-sided die rolls. For example, 3d6 ranges from 3 to 18 as follows:[详细]
2022-12-27 12:29 分类:问答Specializing a class template constructor
I\'m messing around with template specialization and I ran into a problem with trying to specialize the constructor based on what policy is used. Here is the code I am trying to get to work.[详细]
2022-12-27 05:49 分类:问答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 p[详细]
2022-12-21 07:21 分类:问答looping in unit test bad?
I have a unit test that relies on a random dice roll. I roll a 20 sided die and if the value is 20 it counts as a critical hit.[详细]
2022-12-17 03:57 分类:问答