Networked Mancala - PowerPoint PPT Presentation

About This Presentation
Title:

Networked Mancala

Description:

Player 2 waits to receive player 1's first move. Game begins. Network ... Player Waits for Bin Choice. Bin number received through Socket. If turn changes: ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 9
Provided by: csU49
Learn more at: http://www.cs.unc.edu
Category:

less

Transcript and Presenter's Notes

Title: Networked Mancala


1
Networked Mancala
  • XP Agile Methods Team 3
  • Stephen Olivier Keith Lee

2
Programming Environment
  • Side-By-Side Pair Programming
  • Eclipse IDE 3.1.2
  • Java 1.5
  • JUnit 3.8.1
  • Minimal Sleep

3
Activity Diagram
4
Class Structure
  • MancalaGame
  • Directs traffic and bin choices, applies rules
  • MancalaBoard
  • Maintains and displays game board state
  • RemotePlayer
  • Receives bin number from opponent
  • MancalaConnectionManager
  • Login and game set-up
  • Helper Classes for Dialogs, Buttons

5
Graphical User Interface
  • Choosing A Bin
  • Bins are buttons with corresponding numbers
  • Current players non-empty bins are enabled
  • Event Listeners
  • Bin number sent to MancalaGame
  • MancalaGame applies game rules
  • Notify board display elements and remote player
    program
  • Last move and current player highlighted
  • Per-User Score Statistics using Box-Plot

6
Network Communication Part 1
  • Player 1 opens ServerSocket
  • Player 2 connects Socket to ServerSocket
  • Player 1 spawns Socket from connection
  • Player 2 waits to receive player 1s first move
  • Game begins

7
Network Communication Part 2
  • Player Chooses Bin
  • Bin number sent through Socket
  • If turn changes
  • Blocking wait to receive opponents bin choice
  • Wait is separate thread to keep GUI responsive
  • Player Waits for Bin Choice
  • Bin number received through Socket
  • If turn changes
  • Enable local player to choose bin

8
Network Communication Part 3
  • Reset Code
  • Sent if local player quits
  • Received if remote player quits
  • Lost Connection
  • Current game ends
  • Login dialog appears
Write a Comment
User Comments (0)
About PowerShow.com