Hi All

I have a 'style' problem, I'm hoping someone here can sort of help me out.

In my games I typically have a Game Object (Sort of manages screens, states etc). (No probs here)

Then I have a Map class. The map class controls the actual happenings in the game itself. It controls things like drawing, movement, and most importantly collisions and path finding.

I also have a Item class. All objects in the game inherit from this base item class. The Item class knows about the Map (so all descendants can use the pathfinding etc).

Heres my problem. I find my units get rediculously large. For Run-A-War I ended up with something like 15 classes in one unit.

[pascal]
Type
TMap = Class;
TItem = Class
Map : TMap;
End;
TMap = Class
.. Items : TList; ...
Procedure AddItem(Item : TItem);
End;

Procedure TMap.AddItem(Item : TItem);
Begin
Items.Add(Item);
DrawItems.Add(Item);
Item.Map := Map;
End;
[/pascal]

Now the reason for the resulting big units is trying to do a little information hiding by using protected and private methods. If I start having other units I find all my Map methods and properties becoming public which I'm trying to avoid.

Any suggestions.