OOP Design for Boardgame

BlitzMax Forums/BlitzMax Beginners Area/OOP Design for Boardgame

If trolls and dwarfs are really very similar. If, for example, the only difference is like black and white in chess, it's just a team identifier, then I wouldn't inherit them at all. I'd just have a team field and use that.


They're not -- all trolls move like kings in chess, and all dwarfs move like queens. Plus they both have a special move as well, which depends on the locations of the opponent and their own other units. (They can either do a 'normal' move, or get thrown to the end of a line of identical units, IIRC)

The idea is that the trolls are slow, few in number, and strong. The dwarfs are fast, large in number, and weak.

All games are a two-parter, with both players playing each of the races once.