| > Don’t all pieces have a location? Make a table containing locations for each piece. > Aren’t all pieces movable? Make a function ("procedure") that moves a piece (e.g. edits the location table). > Might we want to display pieces? Make a render function (e.g. gets a piece type and a position) > Do we want to journal them to files to save game state, or their moves to streams to play remotely? Write serialization and deserialization routines (again, procedures that get piece type and position). No need to cram that in to some idea of piece "class". That only glues things together that don't belong together. OO is pretty much crap. |