Do I need "cube subclasses" to represent the blocks in a Minecraft-like world?
- by stighy
I would like to try to develop a very simple game like Minecraft for my own education.
My main problem at the moment is figuring out how to model classes that represent the world, which will be made of blocks of various types (such as dirt, stone and sand).
I am thinking of creating the following class structure:
Cube (with proprerties like color, strength, flammable, gravity) with subclasses:
Dirt
Stone
Sand
et cetera
My question is, do I need the Cube subclasses or a single class Cube sufficient?