In this exam, you will create a slot machine game.
The primary work to be done in this exam is to create a tab-based user interface:
Digit class that represents each digit.
The properties of each digit are:
Your Digit class must have the following functions:
spinDigit() - This method randomly selects a digit from 0-9 and sets it's color.
pickDigit() -> UInt32 - This method randomly selects a digit and returns it.
pickColor() -> UIColor2 - This method randomly selects a color and returns it.
getDigit() -> UInt32 - This method returns the current digit.
getColor() -> UIColor - This method returns the current color.
SlotMachineGame class that manages the spinning and the score. The
SlotMachineGame should:
Your SlotMachine class must have the following functions:
init(_ numberOfDigits : Int) - Initializes a new game with the specified number of digits.
resetGame() - Resets to game to beginning with a score of 100.
getScore() -> Int - Returns the current score.
getDigits() -> [Digit] - Returns the game's array of Digits.
spinDigits() - This method spins all the Digits that are part of this game.
Please submit the completed midterm exam on Blackboard as a zip file of your entire project. No other forms of submission will be accepted.