Ask Experts Questions for FREE Help !
Ask
    srb7np's Avatar
    srb7np Posts: 1, Reputation: 1
    New Member
     
    #1

    Sep 19, 2016, 07:08 AM
    Card stacks use of dice
    You have been asked by a local board-game shop to create a flexible card-stack application that can calculate the distribution of any given combination of dice, and keep a card-stack of that combination stored in memory. Whenever the user asks for a number of dice from a previously generated combination, a result should be dealt off the stack and that number should be placed on a list of numbers which have previously been ‘drawn’. When all numbers in the stack have been exhausted, the stack is reshuffled. When creating a card-stack, the user should also be able to specify how many cards should be ‘removed’ from the stack to eliminate the possibility of card-counting. These cards should simply be dealt off the top of a randomly shuffled stack before numbers are generated. A user will request a dice roll by providing dice notation in the form of d Asking for one eight sided dice will be represented by the string 1d8. Four twelve sided dice minus two cards would be 4d12-2. Eight twenty sided dice minus six would be 8d20-6. Four four sided dice would be 4d4. Upon requesting a dice-roll, the application will check to see if it has previously generated a card-stack for that dice combination. If it has, it will provide the next card on that stack. If it has not, it will go through a four step process:
    1. Calculate the correct distribution of results from that dice combination by ‘rolling’ them TEN THOUSAND (10, 000) times, and storing the results of how many times each combination was encountered.
    2. Reducing those values down to the percentage chance of encountering each individual number.
    3. Generating a card stack large enough to give the correct number of each result, to the accuracy of a tenth of a percentage point.
    4. Shuffling that card stack and then removing the correct number of cards as per the user request. A stack then is defined as its dice combination plus the number of cards initially removed from the stack. 3d6-2 should be a different stack to 3d6-4, and should be generated and dealt independently. The application should also allow the player to ‘peek’ at a particular stack at any time to see what numbers will be generated in the future, and in which order, to ensure that the stack is being correctly generated and retained. Peeking should also show which cards have been removed, and which cards have already been ‘dealt’. If desired, the player should also be able to ‘shuffle’ the stack at any time. The application too should maintain a graph for each stack, showing how often each number has been drawn from the stack and how many are left to be generated from each possible number. This should be regenerated every time a number is dealt, and should be displayed when the user peeks at a stack.
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #2

    Sep 19, 2016, 07:15 AM
    What do YOU think ?
    While we're happy to HELP we wont do all the work for you.
    Show us what you have done and where you are having problems..

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

When to put two main stacks [ 2 Answers ]

Hello, I'am under the UPC and I would like to know how far does a waste stack have to be and how far does a taoilet have to be from the stack. Thanks.

Jimmy stacks footage [ 1 Answers ]

I have heard a rumor for years that there exists somewhere some unseen footage from the 70's TV movie 'The Night Strangler' . It is supposed to be a scene involving the reporter Jimmy Stacks.

What is the name of the co dice that were dice models of monsters and had symbols [ 0 Answers ]

They were little dragons with circles on the front and back that looked like eyes had symbols on them and you could role them like dice

Processes stacks up [ 7 Answers ]

Hello everyone. Sometime ago my PC are behaving quite weird, suddenly some proccesses started to stack up, like if I have program1.exe, start it, close it. After I closed it, I still have program1.exe in task bar, and memory is allocated for it, but the process should be dead, if I start it...


View more questions Search