BIS 3325 Home Page The Prior Page The Next Page
Middlesex Logo

Lab 4: Space Wars Agent

  1. I got a bit bored playing Space Wars against myself, so I thought we should make a retro spacewars agent.
  2. One way do this, is to create a new subclass of ship.
  3. I did this (called in MyShip).
  4. Copy the Ship.cs file and put it in the MyShip file.
  5. Change the constructor name (you can get rid of the first one).
  6. Modify the class definition so it is a Ship.
  7. You have to modify the constructors call to base so that it calls the Ship constructor.
  8. Modify RetroScreen.cs so it makes one of the ships your new class (ship2 = new MyShip....). (4 points)
  9. Now, see if you can make the new ship hover against gravity. You can do this by rotating and thrusting.(3 points)
  10. Now see if you can make it shoot. (1 point)
  11. Can you make it shoot the opponent? (2 points)