Functional Design

  1. Requirements Fulfillment
  2. 1.1.  General
    1.2.  Agents
  3. Core Abstractions

  4. User Interface
  5. 3.1.  Actions

1  Requirements Fulfillment

1.1  General

  1. req Select Java as the implementation language.
  2. req Implement as an application/applet hybrid. Also, the core game code can be used from a web application.
  3. req Separate the core game code from the GUI using RMI?
  4. req Provide appropriate abstractions.
  5. req Provide appropriate abstractions.
  6. req Provide appropriate abstractions.
  7. req Implement Tic-tac-toe, Qubic, Pong, and Gin.
  8. req Use the JUnit test framework.

1.2  Agents

  1. req Structure so that the agents are interchangeable.
  2. req An agent class will completely encapsulate it's playing logic.
  3. req Provide utilities.

2  Core Abstractions

  1. A Game holds all the participating objects required for a game.
  2. An Engine drives the game play. For example, an engine implementation may alternate between agents in a synchronous game.
  3. An Environment is where the agents and tokens interact.
  4. An Adjudicator serves as a judge of legal agent actions and determines when the game is over.
  5. A Token represents an object in the game, such as a Chess Knight or a spacecraft.
  6. A Team is a grouping for tokens and agents.
  7. An Agent produces actions to affect the environment.
  8. An Action contains information for a change to the environment. For instance, an agent action may indicate the move of a token.

3  User Interface

The user interface is separated from the core game code. The user interface classes are notified of game changes via events. A user interface may be implemented as a text/command line approach, using AWT, or in Swing.

3.1  Actions

  1. About - display information about the game
  2. Quit - quit the game
  3. New - create a new game
  4. Open - open a previously saved game
  5. Save - save the current game
  6. Save As - save the current game to another file
  7. View status bar toggle - display the status bar
  8. Audio toggle - play audio