I am working on a dice project that requires players to roll the number of the corresponding round. I have pictures demonstrating what I have compelted so far. I need to incorporate a trial counter to determine how many rolls it takes for a player to roll the number corresponding to the round. I also have these three tasks and do not know how to incorporate them into the script. Thank you. ● Store a win for Player 1 or Player 2 after each round (indicate a win by a 1 and a loss by a 0). ● Store the cumulative wins of each player after each round (“P1Wins_Talley” and “P2Wins_Talley”). ● Store the overall game results in a matrix called “store_results”. Column 1 lists the round number, Column 2 lists the total number of trials in that round, Column 3 records which player won that round (1 or 2), Column 4 records the value of Dice 1, Column 5 records the value of Dice 2, Column 6 records the sum of the two dice at the end of that round (which should equal the value in Column 1)
I am working on a dice project that requires players to roll the number of the corresponding round. I have pictures demonstrating what I have compelted so far. I need to incorporate a trial counter to determine how many rolls it takes for a player to roll the number corresponding to the round. I also have these three tasks and do not know how to incorporate them into the script. Thank you.
● Store a win for Player 1 or Player 2 after each round (indicate a win by a 1 and a loss by a 0).
● Store the cumulative wins of each player after each round (“P1Wins_Talley” and “P2Wins_Talley”).
● Store the overall game results in a matrix called “store_results”. Column 1 lists the round number, Column 2 lists the total number of trials in that round, Column 3 records which player won that round (1 or 2), Column 4 records the value of Dice 1, Column 5 records the value of Dice 2, Column 6 records the sum of the two dice at the end of that round (which should equal the value in Column 1)
Trending now
This is a popular solution!
Step by step
Solved in 5 steps
I am still a little confused on the setup for implementing the matrice for the store results. Is each step listed above a different method of completing the script? I am lost on how to put everything together regarding the matrice and keeping track of the trials and rounds