1 / 11

Game Specific Options (Pre-Initialized) Board Size? Starting Position?

Start Specific Game. End Specific Game. Top Level GUI States. Game Specific Options (Pre-Initialized) Board Size? Starting Position? Allow Diagonal moves or wins? Etc…. Play Game (Initialized) Player is computer/human? Who goes first? Player Names

willa
Télécharger la présentation

Game Specific Options (Pre-Initialized) Board Size? Starting Position?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Start Specific Game End Specific Game Top Level GUI States Game Specific Options (Pre-Initialized) Board Size? Starting Position? Allow Diagonal moves or wins? Etc… Play Game (Initialized) Player is computer/human? Who goes first? Player Names And of course actually playing the game

  2. Initialize Game Specific Game Board Create board pieces, set board size, add bindings, etc… ANIMATION!!! De-Initialize core GUI Disables buttons, possibly shrinks or destroys windows De-Initialize Game Specific Game Board Return board to empty state prior to initialization End Specific Game Initialization/De-initialization Initialize core GUI Buttons for changing player names, whether a player is computer or human, etc… Start Specific Game

  3. Start Specific Game End Specific Game Play Game State Game Specific Options (Pre-Initialized) Board Size? Starting Position? Allow Diagonal moves or wins? Etc… Play Game (Initialized) Player is computer/human? Who goes first? Player Names And of course actually playing the game

  4. Play Game State (cont) Three Substates 1: No Game Initialized Yet Game board exists, but no game has been run Board appears as is after Game Specific Initialize 2: Mid Game Game has been started but is not over Pieces and board exist, and moves are shown 3: End Game Game has ended. Pieces and board exist, but moves are not shown. Game Specific end game animation may have occurred

  5. 1: No Game Started 1: No Game Started 2: Mid Game 3: End Game 2: Mid Game 2: Mid Game 2: Mid Game 3: End Game 3: End Game 2: Mid Game From State to State

  6. New Game (button) Setup Set Up Global Variables and Prepare for New Game Clear board Return the board to a predetermined state Game Specific! Draw board Draws the new Game board given the initial position Driver Loop This loop drives the game until a human player’s turn is at hand State 1 2: Mid Game or 3: End Game 1: No Game Started

  7. Game Over Game Specific Game Over Sequence 3: End Game Primitive position? Player is human? Show Moves Given the move type, current position, and move list with values and remoteness Shows the moves appropriately based on move-type 2: Mid Game Player is computer? Get move from database Update Globals Handle Move Game animates move Board is visually set up to match the new-position Driver Loop Driver Loop

  8. Get Human Move Obtain the user move by interaction with the game board Hide Visible Moves New Game (button) Handle Move Game animates move Board is visually set up to match the new-position Setup Set Up Global Variables and Prepare for New Game Clear board Return the board to a predetermined state Game Specific! Draw board Draws the new Game board given the initial position Driver Loop This loop drives the game until a human player’s turn is at hand State 2 2: Mid Game 2: Mid Game or 3: End Game

  9. 3: End Game Driver Loop This loop drives the game until a human player’s turn is at hand Undo (button) Show Moves Game Over Sequence Cleanup Allows the “reversal” of a Game Over Sequence so the last position is re-displayed Determine which type of undo is necessary Undo move Graphically undoes the move State 2 (cont) and State 3 2: Mid Game Hide Moves

  10. Showing Moves All Moves (button) Switch the currently shown moves to selected Value Moves (button) Best Moves (button)

  11. Overview Setup Clear board Draw board New Game (button) 1: No Game Started Handle Move Driver Loop 2: Mid Game Get Human Move Hide Visible Moves Show Moves Undo move Undo (button) Game Over Sequence Cleanup Show Moves Which Undo? 3: End Game

More Related