|
|
|
|
|
by marginalia_nu
1295 days ago
|
|
To be fair, none of the functions you listed, as far as I can tell, need to know anything about what they're operating on. You can implement all but the last on a generic list of objects. The last I'd probably implement as a container object Turnable<C> that adds an orientation state to any parametrized type, including Reversi disks. I feel the card itself should be immutable as far as possible. It's state: orientation, owner, location and whether it's dog-eared should be kept separately. |
|