I''m making a tetris game for a school project, and we have to include inheritance in this, so I was thinking of making a base class Shape, and then derived classes for each different shape, does this sound like a good place for inheritance, any other ideas where it could be used?
----------------
Freeride Designs
----------------
Inheritance
quote:
Original post by Freeride Designs
I''m making a tetris game for a school project, and we have to include inheritance in this, so I was thinking of making a base class Shape, and then derived classes for each different shape, does this sound like a good place for inheritance, any other ideas where it could be used?
----------------
Freeride Designs
----------------
Sounds like a very good place for inheritance. e.g. all the
shapes must be able to turn. So add a pure virtual function
turn() to your base class and override it in our derived classes.
(Computer && !M$ == Fish && !Bike)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement