Project 4

In your final project you need to develop managed classes you have designed in your previous project. Please do the following:
  1. Create a Windows Form Application project with the text boxes that allow the user to enter the number of armies to battle, the number of robots on each army, the number of cells on the grid, etc.
  2. Call the constructor for your BattleField object taking the arguments from the user input. Make sure you handle possible exception situations that can occur due to an incorrect input.
  3. On your form have a panel object and a multi-line text box object. Please add pointers to the text box and to a Graphics object for the panel as data members to your classes. The text box object will serve as the console for the trace output (use AppendText() instead of cout<<... everywhere you need). If you decide to implement graphical part use the graphics object to draw pictures of your battle objects.
  4. All classes you need are to be managed classes either defined as reference classes (__gc) or as value (__value). You may use the classes we have discussed in the class (such as Location or BattleObjectQueue).
  5. Please note that for the new queue you do not need the old PRobot class because now we just store managed pointers to battle objects. That is, you need to remove the PRobot class from your UML diagram. Also don't forget to add the Form class for your windows form to the diagram.
  6. Use the try ... catch construct where ever is appropriate.
  7. Do not forget to comment your code.

Note that despite you have to have the panel for the graphics, the implementation of the graphical part is optional. You can get extra credits for doing this, but I would recommend to do this when your game engine is complete. The text box debugging output is required, though.

The completed project should include two parts:

  1. the updated MS Visio document with the UML diagram that shows all your classes and their relations;
  2. MS Visual Studio project that is compileable and can handle up to 3 different teams with up to 100 robots on each team.

Additional requirements: