Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This tool is provided by a third party. Your activity is always recorded, but you may need to refresh the page to fill in the
This tool is provided by a third party. Your activity is always recorded, but you may need to refresh the page to fill in the banner LAB ACTIVTY 23.24.1: Slot Machine (Branches) Part 8 What happened? 0/10 Slot Machine Part 9 The double diamond slot machine game has three windows. Each window shows either a double diamond (DD'), a cherry (C'), a single bar (B'), double bar ('BB') or triple bar (BBB'), or the number seven (7') or a blank ('O'). There are nine possibilities that need to be accounted for: 7, AB AB AB where AB = ANY BAR (i.e., a single, double or triple bar) 8. CC Xi.e. two C where X could be either B, BB, BBB, 7 or 0 9. CX X i.e. oneC where X could be either B, BB, BBB, 7 or 0 Cherries result in a payout regardless of what appears with them. The double diamond is wild and can represent any of the other signs to maximize payout. Write a function DoubleDiamond to test all possible outcomes given symbols in three windows. The ouput is a 1 x 9 logical array indicating the occurance [three DDs, three 7s, three BBBs, three BBs, three Bs, three Cs, three ABs, two Cs, one C] Restriction: The function DoubleDiamond must use the custom functions written in Part 1 to 8 (should be used either directly, or indirectly when called by another custom function). The custom functions are: AssignNumber, NumberofDoubleDiamonds, NumberofCherrie:s IsOneCherry, IsTwoCherries, IsThreeCherries, IsThreeABs, Is3OneBar, ls3TwoBars, Is3ThreeBars, ls3Sevens and Is3Diamonds For example logicVector 1x9 logical array This tool is provided by a third party. Your activity is always recorded, but you may need to refresh the page to fill in the banner LAB ACTIVTY 23.24.1: Slot Machine (Branches) Part 8 What happened? 0/10 Slot Machine Part 9 The double diamond slot machine game has three windows. Each window shows either a double diamond (DD'), a cherry (C'), a single bar (B'), double bar ('BB') or triple bar (BBB'), or the number seven (7') or a blank ('O'). There are nine possibilities that need to be accounted for: 7, AB AB AB where AB = ANY BAR (i.e., a single, double or triple bar) 8. CC Xi.e. two C where X could be either B, BB, BBB, 7 or 0 9. CX X i.e. oneC where X could be either B, BB, BBB, 7 or 0 Cherries result in a payout regardless of what appears with them. The double diamond is wild and can represent any of the other signs to maximize payout. Write a function DoubleDiamond to test all possible outcomes given symbols in three windows. The ouput is a 1 x 9 logical array indicating the occurance [three DDs, three 7s, three BBBs, three BBs, three Bs, three Cs, three ABs, two Cs, one C] Restriction: The function DoubleDiamond must use the custom functions written in Part 1 to 8 (should be used either directly, or indirectly when called by another custom function). The custom functions are: AssignNumber, NumberofDoubleDiamonds, NumberofCherrie:s IsOneCherry, IsTwoCherries, IsThreeCherries, IsThreeABs, Is3OneBar, ls3TwoBars, Is3ThreeBars, ls3Sevens and Is3Diamonds For example logicVector 1x9 logical array
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started