Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question(s) must be answered using MATLAB. Thank you! Slot Machine Part 4 The double diamond slot machine game has three windows. Each window shows either
Question(s) must be answered using MATLAB. Thank you!
Slot Machine Part 4 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 ('0'. Complete the test function with subfunctions to detect from symbols of three windows (w1,w2,w3), the following subfunction name: IsOneCherry Inputs: w1,w2,w3 (type: string); Output: logical subfunction name IsTwoCherries Inputs: w1,w2,w3 (type: string); Output: logical subfunction name: sThreeCherries Inputs: w1,w2,w3 (type: string): Output: logical Hint: In writing branching code, instead of using the symbols, use the corresponding numbers. Restriction: The script must use as a custom functions AssignNumber and NumberofCherries, similar to what were written in Slotmachine Part 1and 3, respectively. For example: w2='BB',w3-'7'; [test1, test2, test3]:TestTheCherries (wi,w2 ,w3) >>w1="C'; test1 - Logical test2 = logical test3 = logicalStep 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