eMancala - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

eMancala

Description:

Type of opponent (human vs. computer) is transparent ... Almighty Jeff forfeits the game. Rufus makes losing move. Meanwhile ... He must not know who I am ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 18
Provided by: sasA5
Category:

less

Transcript and Presenter's Notes

Title: eMancala


1
eMancala
  • Sasa Junuzovic
  • Jeff Terrell

2
eMancala Architecture
Program
User-Interface
3
eMancala Architecture
Program
Output
Input
User-Interface
Bowl Counts
Valid Bowl
Bowl Clicks
Invalid Bowl
Player Color Selection
Status Messages
Enabled Buttons
Button Clicks
Last Move Info
4
Computer Opponent
Program
Opponent
5
Computer Opponent
User clicks on a bowl
Program
Sends game state to UI
Opponent
Logic
Sends game state to opponent
Validate move Set bowl counts
6
Computer Opponent
Program
Sends game state to UI
Opponent
Logic
Sends game state to opponent
Opponent picks a bowl
Validate move Set bowl counts
Hmmm ... Tsk, tsk, tsk, ...
7
Computer Game
Game Starter
Computer Game
Network Game
8
Network Game
Running on port 31337 eleet
Game Starter
Java RMI Registry
Host
Network
Running on port 31337 eleet
Client
Game Starter
Java RMI Registry
9
Network Game
Program
Program
Network
10
Network Game
Program
Program
Network
11
Network Game
Program
Program
Network
Type of opponent (human vs. computer) is
transparent to the program
Both implement the same interface
12
Network Game
Jeff's UI is updated
Jeff clicks on a bowl
... as is Rufus'
Program
Program
Network
Which is an RMI call
13
Handling Simultaneous Events
He must not know who I am ...
I am the CSSA president!
Almighty Jeff forfeits the game
Rufus makes losing move
Meanwhile ...
Program
Program
Network
?
Unhandled race conditions can leave application
in an invalid state
14
Handling Simultaneous Events
Game forfeited
Losing move
Forfeit game
Event serializer (synchronized in Java
speak)
15
Handling Simultaneous Events
Game forfeited
Losing move
Move not processed because game is forfeited
Forfeit game
Event serializer also used for events related to
establishing a network game
Event serializer
16
Demo
17
QA
Write a Comment
User Comments (0)
About PowerShow.com