670 S '07
Squadron Scramble
Project 1
Project 2
Project 3
Project 4
Project 5
Project 6
Project 7
Project 8
Project 9
Project 10
Project 11
Project 12
Project 13

Project 8

Due date: 3/2 : 11:59pm

Visualize the State of a Player

Task 1: [POINTS: 30] Your last task before spring break is to add a module that helps you visualize a game graphically. First, change the interface of player so that create-player consumes a second argument:

   create-player :: string? boolean? -> player/c
   ;; create a player, with[out] visual display
If the argument is true, the player's actions are visualized. If the argument is false, they aren't.

To accomplish this, you should use the model-view pattern (aka MVC). That is, your visualization code should be completely separated from your player code. Furthermore, it should be possible to use two distinct, unrelated graphical tool boxes to implement the visualization module. [Note: the pattern usually comes with the word "control". Since you are not implementing an interactive graphical user interface, you don't need a control.]

Your code should be able to display at least fours parts of the player's state:

  1. the name of the player (as specified in create-player);
  2. the current hand;
  3. all discarded airplanes, which includes both the properly discarded squadrons as well as those fighter squadrons used to shoot down the bomber squadrons of other players; and
  4. the number of points that the player is guaranteed to win during the on-going battle, i.e., the points for the bomber squadrons that have been shot down.
This part of the assignment is worth 10 points.

Your code should be able to visualize at least two player actions:

  1. each change to its state during a method call,
  2. and the beginning of a turn.
Each of those two pieces is worth 10 points.

The external design (i.e., the look and feel) of the graphical visualization is up to you. You are free to choose your favorite graphical toolbox and display medium. I have posted an example above, but you are not forced to follow this in any way.

For the internal design, you should follow the standard rules of programming you have encountered at Northeastern.

Task 2: [POINTS: 10] Read up on the Open Cable Application Platform (OCAP). Then write up one paragraph (at most 250 words, usual HTML format) comparing the 670 project to elements of OCAP programming.

last updated on Tue Jun 9 22:03:19 EDT 2009generated with PLT Scheme