From: <wak...@ea...> - 2005-08-04 08:20:28
|
I've reorganized the Hex code a bit, mostly to reduce the amount of code duplication that was rampant after splitting things up to do N-S and E-W hex orientation. So, here's how things look in CVS right now, listed in rough order of the class hierarchy: Hex : the base class BattleHex : the Hex Model (needs renaming) GUIHex : stores GUI info about hexes NSGUIHex, EWGUIHex : Stores orientation-specific info about hexes HexMap : stores orientation agnostic info for the GUI GUINSHexMap, GUIEWHexMap : stores orientation-specific info for the GUI BattleMap : the GUI of the mapboard. The biggest change is adding the abstract class HexMap to store all the code that previously was duplicated within GUINSHexMap and GUIEWHexMap. Smaller, similar changes were needed between GUIHex and NSGUIHex and EWGUIHex as well. I'm hoping this won't increase the complexity of the code too drastically (ha!). Right now, the easiest way to change between N-S and E-W oriented hexes is to change the signature of BattleHex, because it currently extends the particular hexmap. I'm still thinking on how to deal with that. I'm thinking that replicating the tile laying mechanism that SimTex's 1830 PC Game used is probably the easiest way to go. While it would be nice to do drag-n-drop tile laying, I think clicking on the tile to click through possible upgrades is going to be easiest and require the least amount of screen real-estate. That's all I have for now. ---Brett. |