Video Slot Machine: 1 Problem Statement
Video Slot Machine: 1 Problem Statement
Assignment 2
1 Problem Statement
Traditional slot machines (see picture on the left side of Fig. 1) have in recent years been replaced by video slot machines
(see picture on the right of Fig. 1). Your task is to elaborate the requirements for a video slot machine, which allows users
to gamble credits on spinning reels as described in this document. The requirements described here are taken from a real
video slot machine requirements document from industry, but have been shortened to fit the scope of this requirement.
In particular, the legislative regulations have been heavily simplified.
Figure 1: Mechanical Slot Machine (left) and Video Slot Machine (right)
1
3 Additional Game Details
3.1 Credits and Promotional Credits
The unit for bets and wins is the “credit”. The credit-to-currency conversion ratio can be configured for each EGMs.
Typically, a credit is worth $0.25, but machines allowing higher wagers, such as $100 per credit, are not uncommon.
Players can buy credits by inserting coins or bills in the corresponding acceptors of the EGM. A special “ticket slot”
also accepts tickets issued by a central casino authority that represent a certain amount of money. To validate a ticket, the
EGM needs to communicate with the SAS (Slot Accounting System) host. Tickets are gaining popularity and importance,
as more and more modern casinos move towards cashless gaming. To attract customers, some casinos also distribute
special tickets that contain “promotional credits” that a player can redeem at an EGM to play. These restricted credits,
however, can not be converted to currency (cashed out). They must be used for wagering.
Depending on the installed and configured hardware, the current value of credits may be cashed out by a coin hopper,
a ticket printer or be hand paid by an attendant. Again, ticket cash out requires a online connection with the SAS host.
Winning a prize larger than a certain value forces the prize to be paid by an attendant, who in turn is obliged to notify the
IRS (Internal Revenue Service). Winning such a prize suspends the game and puts the EGC in a handpay lockup. Only
after the attendant acknowledged the payout and reset the condition (see subsection 3.6.3 below), the game is playable
again.
3.2 Reels
There are typically 5 reels in a slot machine, each one with a fixed number of “slots” (typically 22, but there could be more
or less). Each slot displays an icon. The visual appearance of the icons is usually aligned with the theme of the EGM. On
each reel, a given icon can appear multiple times.
3.3 Paylines
Mechanical slot machines typically only offer one payline: the icons shown in the center of each reel are used to form one
5-icon combination, and then used to lookup the amount won, if any, in the paytable. Video slot machines offer the player
the possibility to activate more than one payline. In the stopped position, each reel shows 5 icons (at index -2, -1, 0, 1,
and 2). The standard payline looks at the icons at index (0,0,0,0,0). However, additional paylines include the other 4 lines
(e.g., -1,-1,-1,-1,-1), or diagonals (e.g. -2, -1, 0, 1, 2), or even waves (0, -1, 0, 1, 0). Fig. 2 shows an example of 30 possible
paylines that are available in the Cops n’ Bandits video slot machine. Of course, when n paylines are active, each game
uses n times the selected wager.
• Maintenance Mode: which can be activated by the assistant on the main assistant screen, or activated remotely by
the SAS
• SAS communication error
• Any monitored door is open (main door, card cage door, cash box, belly door or slot door).
• Errors in bill validator: Stacker Full, Bill Jam, Counterfeit bill detected, Bill rejected (reason other than counterfeit
bill)
• Errors in printer: Out of paper, Paper low, Carriage jammed
• Errors in coin comparator: Coin in tilt
2
Figure 2: Cops n’ Bandits 30 Paylines
Each out of service condition can be reset by fixing the problem (for cases like network error, or door open), or resetting
the condition using the option “Return To Service” in the main assistant menu, or resetting it remotely by the SAS. This
returns the EGM to normal mode (i.e. the attendant light is switched off and the game is playable again).
3
• Game events with full details (credits bet, paylines selected, reel positions, credits won per payline)
3.6.2 Meters
In addition, the Nevada Technical Standard for Gaming Devices requires the following meters for proper accounting
purposes:
• Coin In: The total value of credits bet (corresponds to NV 2.040(a))
• Coin Out: The total value of credits directly paid by the EGM as a result of winning wagers (i.e., excluding hand
pays) (corresponds to NV 2.040(b))
• Total Accepted: Total credits inserted into the EGM by any means (coins, bills, tickets). (corresponds to NV 2.040(f)
plus NV 2.040(h) plus all accepted tickets)
• Total Jackpot: Total credits paid by an attendant as a result of jackpot handpays (corresponds to NV 2.040(d))
• Total Cancelled: Total value of credits cashed out from the EGM by any means (coins, ticket, handpays not due to
a jackpot win) (corresponds to NV 2.040(e) plus NV 2.040(g) plus printed tickets)
You can find details on the meters on the “Proper Accounting for Gaming Devices” document available from the Nevada
State Gaming Control Board website: http://gaming.nv.gov/modules/showdocument.aspx?documentid=2918
• Set the time span after which an idle machine starts playing an attract animation
• Set the IP address of the SAS
• Set the limits for bets, if any
4
SlotMachine *
Gamble <<in
e>> clud <<includ
clud e >> e>>
<<in Player
s>>
end
>
lude>
e xt
<<
1 BuyCredits BuyCredits CashOut CashOut 1
<<
<<inc
<<inc
ex
WithCoins WithBills Ticket Coin
ten
lude>
ds
>>
Coin Redeem Coin
>
Comparator Ticket Hopper
Progressive
1 1
Jackpot
Test Handpay
Bill Ticket
Select
Validator Printer
Outcome
1 Audit 1
Attract
Configure
Player
Ticket SASHost
Reader
1 * * 1
5
Main Success Scenario:
1. Player buys credits.
Step 1 can be repeated any number of times, and execute even in parallel with 2.
2. Player plays a game on the EGM.
Step 2 can be repeated any number of times, until the Player decides to cash out his money.
3. Player cashes out the current credits.
Extensions:
1a. Player is not able to buy credits. Use case ends in failure.
(2-3)a. Player has no credits left. Use case ends in success.
(1-3)a. The CoinComparator, BillValidator, TicketReader, CoinHopper or TicketPrinter notify the System of a problem.
(1-3)a.1. System turns on AttendantLight.
(1-3)a.2. System notifies SASHost and goes out of service, waiting for maintenance. Use case ends in failure.
6
RedeemTicket Use Case
Use Case: RedeemTicket
Scope: EGM
Level: Subfunction-level (could be user goal)
Intention in Context: The intention of the Player is to buy credits for the EGM in exchange of a ticket.
Multiplicity: Only one Player can buy credits at the EGM at a given time.
Primary Actor: Player
Secondary Actor: TicketReader, SASHost, Player
Main Success Scenario:
Step 1 and 4 can be repeated as many times as desired.
1. TicketReader informs System that the Player inserted a ticket.
2. System contacts SASHost to validate ticket.
3. SASHost notifies S ystem that ticket is valid.
4. System informs Player about his current credits.
Extensions:
1a. TicketReader informs System of an error. Use case ends in failure.
3a. SASHost notifies System that ticked is invalid.
2a.1 System informs Player that the inserted ticket is not valid.
2a.2 System commands TicketReader to eject the ticket. Use case continues at step 1.
7
3.1.1 System contributes to progressive jackpot on SASHost according to the configuration settings. Use case continutes
at step 4.
4.1 System is not in demo mode and determines that the Player has won the progressive jackpot.
4.1.1 System informs SASHost that the successive jackpot was won.
4.1.2 SASHost informs System of the amount that was won. Use case continues at step 5.
8
Audit Use Case
Use Case: Audit
Scope: EGM
Level: User Goal
Intention in Context: The intention of the Auditor (Attendant, Operator or SASHost) is to query information about
the history of events registered in the EGM.
Multiplicity: Only one Attendant or Operator can audit the EGM at a given time, and only if no player is currently
gambling on the machine. The SASHost can audit the EGM while a player is gambling on the machine.
Primary Actor: Attendant, Operator or SASHost (referred to as Auditor )
Secondary Actor: TicketPrinter
Main Success Scenario:
1. Auditor identifies himself to System.
2. System acknowledges successful identification to Auditor.
Steps 3 and 4 can be repeated as often as requested by the Auditor.
3. Auditor requests information about a meter or event history from System.
4. System presents requested information to Auditor.
5. Auditor logs out of System.
Extensions:
1a. Auditor is an SASHost. Identification is not necessary, as it is peformed by the underlying communication protocol.
Use case continues at step 3.
5a. Auditor (which must be an Attendant or Operator ) requests System to printout the history and meter values and
reset the machine.
5a.1 System prints event history and meters on TicketPrinter. Use case continues at step 5.
5a.1a. TicketPrinter informs System about problem. Use case continues at step 5 without resetting the machine.
9
Test Use Case
Use Case: Test
Scope: EGM
Level: User Goal
Intention in Context: The intention of the Operator is to test the EGM by running it in demo mode.
Multiplicity: Only one Operator can test the EGM at a given time, and only if no player is currently gambling on the
machine.
Primary Actor: Operator
Secondary Actor: n/a
Main Success Scenario:
1. Operator identifies himself to System.
2. System acknowledges successful identification to Operator.
3. Operator instructs System to switch to demo mode.
4. System prompts Operator for demo PIN.
5. Operator inputs demo PIN into System.
6. System acknowledges demo mode switch to Operator.
Step 7 and 8 can be repeated as many times as needed.
7. Operator informs System about the amount of demo credits to add.
8. System acknowledges the adding of credits to Operator.
Step 9 can be repeated as many times as needed.
9. Operator plays the game.
10. Operator informs System that he wants to exit the demo mode.
11. Operator logs out of System.
Extensions:
(6-10)a. System was idle for longer than demoTimeout. Use case continues at step 4.
10
AttractPlayer Use Case
Use Case: AttractPlayer
Scope: EGM
Level: User Goal
Intention in Context: The intention of the Casino is to attract a new player to the machine.
Multiplicity: Only one AttractPlayer animation can be running at a given time.
Primary Actor: Casino (is a stakeholder that does not interact with the system directly)
Secondary Actor: Player, Attendant
Main Success Scenario:
System is idle for a specific amount of time (timeBeforeIdleAnimation).
1. System plays attract animation on TouchScreen.
2. Player notifies System of his presence.
Extensions:
1a. SASHost notifies System of current value of progressive jackpot.
1a.1. System advertizes value of progressive jackpot to Player. Use case continues at step 1.
2a. Attendant notifies System of his presence. Use case ends in failure.
11
1
outOfService
validateTicket ticketValidation
1 pJackpotWon :SASHost pJackpotValue
handpayRequired pJackpotWonValue resolvedError
requestTicket resetWinToCredits demoPIN
:AttendantLight lightToggle auditGameInfo newTicket addCredits
auditMeterInfo audit configure
1 configureAck configure audit
pJackpotContribution ignoreError cashOut
: EGM handpayCompleted
:BetButton setBet setPaylines
1 startPlay consultPaytable 1
<<time-triggered>>
:PlayButton idleTimeout playerErrorNotification :TouchScreen
currentPJackpot
12
dmToggle demoTimeout
1 currentCredits
gameOutcome
ticketInserted creditsWon
:DemoSwitch ticketReaderError paytableInfo
printHistory handpayRequired
printTicket auditGameInfo
doorToggle ejectTicket auditMeterInfo
configureAck
printerAck 1 promptDemoPIN
coinInserted
* serviceAck
ejectCoins
ejectBill
* :TicketPrinter playAttractAnimation
billInserted
coinComparatorError
:TicketReader
coinHopperAck
outOfService
billValidatorError
1 1 1
:Door
1 {ordered} 0..*
SlotMachine 1 Event * RandomGenerator 1 Clock 1
-- configuration history now: Time
currentTime: Time
TouchScreen idleSince: Time
1 powerOn: Time GamePlayed
timeBeforeIdleAnimation: Time 0..1 Ticket *
In cents
creditToCurrencyRatio: Integer value: Money
per credit
PlayButton irsLimit: Money promotional: Boolean
1 maxBetCredits: Natural playedGame 1
currentLanguage: Language
demoPIN: String Game *
0..1
BetButton demoTimeout: Time creditsBetPerPayline: Credits usedIn selectedPayline Payline 1..20
pJackpotEnabled: Boolean currentGame outcomeDecided: Boolean
0..* 0..* offsets: Offset
pJackpotGroupID: Integer outcome: OutcomeType defaultPayline 1
1 pJackpotContribution: Percentage Win
sasIPAddress: String amount: Credits
TicketPrinter
1 1 1 * 1
cashedTicket 1
Ticket printedTicket
1
13
Input Messages
• addCredits(cr: Credits: sent by TouchScreen when operator adds credits in demo mode.
• audit(a: AuditKind): sent by TouchScreen when Attendant or Operator wants to query the meters or the recent
events of the slot machine. Can also be sent by SASHost.
• billInserted(m: Money): sent by BillValidator when Player inserts a bill.
• billValidatorError(s: BillValidatorStatus): sent by BillValidator when an error occurs.
• cashOut(c: CashoutKind): sent by TouchScreen when Player wants to cash out his credits.
• coinComparatorError(s: CoinComparatorStatus): sent by CoinComparator when an error occurs.
• coinHopperAck(s: CoinHopperStatus): sent by CoinHopper when printing fails for some reason.
• coinInserted(m: Money): sent by CoinSlot when Player inserts a coin.
• configure(..): sent by TouchScreen when Operator wants to change the configuration of the slot machine. The
parameters must clearly identify the configuration parameter that is requested to be modified and the value to which
it should be set. Can also be sent by SASHost.
• consultPaytable(): sent by Touchscreen when Player wants to look at the winning combinations.
• demoPIN(pin: String): sent by TouchScreen when operator provides the demo PIN.
• dmToggle(on: Boolean): sent by DemoSwitch when operator activates or deactivates the demo mode.
• doorToggle(who: ServicePersonKind, open: Boolean): sent by Door when opened or closed.
• handpayCompleted(): sent by Touchscreen when Attendant or Operator has completed the handpay.
• ignoreError(e: ErrorStatus): sent by SASHost to instruct the system to ignore an error.
• newTicket(t: Ticket): sent by SASHost.
• pJackpotValue(m: Money): sent by SASHost to inform EGM of the current value of the progressive jackpot.
• pJackpotWonValue(t: Time, m: Money): sent by SASHost to inform EGM of the value of the progressive jackpot
when it was won at time t.
• printerAck(e: PrinterStatus): sent by TicketPrinter when printing fails for some reason.
• resetWinToCredits(): sent by SASHost to reset the handpay win to credits.
• resolvedError(e: ErrorStatus): sent by TouchScreen when attendant or operator has serviced the machine.
• setBet(c: Credits): sent by BetButton when Player determines the amount of credits to bet.
• setPaylines(p: Set(Payline)): sent by Touchscreen when Player selects desired paylines.
• startPlay(): sent by PlayButton when Player wants to start spinning the reels.
• ticketInserted(t: Ticket): sent by TicketReader when Player inserts a ticket.
• ticketReaderError(s: TicketReaderStatus): sent by TicketReader when an error occurs.
• ticketValidation(t: Ticket, valid: Boolean): sent by SASHost to inform EGM about validity of ticket t.
• <<time-triggered>> demoTimeout(): triggered when the system has been in demo mode and idle for a duration
of demoTimeout.
• <<time-triggered>> idleTimeout(): triggered when the system has been idle for a duration of timeBeforeIdleAn-
imation.
14
Output Messages
• auditInfo(..): sent to TouchScreen or to SASHost to communicate the information requested with a previous
audit message
• configureAck(..): sent to TouchScreen or SASHost to acknowledge entering of demo mode.
• creditsWon(winAmount: Credits, currentCredits: Credits): sent to TouchScreen to inform Player of win-
nings.
• currentCredits(c: Credits): sent to TouchScreen to inform Player of the number of credits currently available
for betting.
• currentPJackpot(m: Money): sent to TouchScreen to inform Player of the current value of the progressive jackpot.
• demoSwitchAck(): sent to TouchScreen to acknowledge entering of demo mode.
• ejectBill(): sent to BillValidator when EGM wants to eject the current bill.
• ejectCoins(m: Money): sent to CoinHopper when a Player wants to cash out with coins.
• ejectTicket(): sent to TicketReader when EGM wants to eject the current ticket.
• gameOutcome(o: Outcome): sent to TouchScreen to inform Player of game outcome.
• handpayRequired(amount: Money): sent to SASHost and TouchScreen when a Player wins a substantial amount
of money.
• outOfService(): sent to TouchScreen when EGM goes out of service.
• paytableInfo(p: Paytable): sent to TouchScreen when player wants to consult the paytable.
• pJackpotContribution(t: Time, m: Money): sent to SASHost when a Player spins the reels.
• pJackpotWon(t: Time): sent to SASHost when a Player wins the progressive jackpot.
• playAttractAnimation(..): sent to TouchScreen when system has been idle for a long time.
15
6 Operation Model
Develop an Operation Model for the EGM that covers all system operations related (directly or indirectly) to the Gamble
use case. You are allowed to omit the BuyCreditsWithBills use case, since it is very similar to BuyCreditsWithCoins.
Although you do not have to provide the functionality described by the use case Test, the functionality you are specifying
for the operations that are used in Gamble must include the behaviour necessary to correctly handle game play in demo
mode.
To simplify your task, you can assume the following pre-defined OCL functions:
• RandomGenerator::random() : OutcomeType – a function that yields a random game outcome, i.e., a tuple con-
taining 5 random reel positions.
• Paytable::winsJackpot(o: OutcomeType) : Boolean – a function that determines if the game outcome o cor-
responds to winning the jackpot of the machine
• Paytable::winsPJackpot(o: OutcomeType) : Boolean – a function that determines if the game outcome o
corresponds to winning the progressive jackpot
7 Protocol Model
Develop a Protocol Model for the Gamble use case. If you want to use the jUCMNav tool to create the model, check out
the documentation and installation instructions here:
http://jucmnav.softwareengineering.ca/ucm/bin/view/ProjetSEG/WebHome
8 Hand-In
Please hand in pdf, .jucm, or a paper copy of your solution until Wednesday November 13th. Remember that you
are allowed to work in teams of 2, but not with a person you worked with for assignment 1. If you work with some-
one, please hand in a single copy signed by both of you. In case you submit electronically (preferred), please send
the files to [email protected] with the title “COMP-533 Assignment 2 of yournames” and cc me as well (Jo-
[email protected]). If you don’t get an acknowledgment for your email within 24 hours, send us another email
(without attachment, but putting the hand-in somewhere where we can download it). Late hand-ins are not accepted.
16