OO for Game Engines

Introductions

Introduce yourselves!

Icebreaker: What game are you playing most right now?


Groupwork

Assume you want to design a racing game with three vehicle types: Jeep, Truck, and Tank.

As a group:

  1. Design classes that support this game, specifying needed methods.

  2. Assume the game was running and the current vehicle was stored in the variable V of type Vehicle.

    1. What class's code gets executed when the vehicle moves (move() is called)?

    2. What class's code gets executed when the vehicle fires (fire() is called)?

    3. What happens if the vehicle is a Jeep and it tries to fire?


Hand-in

Have ONE person from each group submit the group's answers:

https://wpi.qualtrics.com/jfe/form/SV_bPoU1Ecu8K64JsW

Make sure to include the names of all group members.

Happy engine-ing!

-- Mark