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