|
From: Ben K. <ben...@it...> - 2003-05-18 03:55:10
|
Im sorting out units and am after some comments on what people think of groups. At present I have groups and Fleets , with fleets inheriting from groups but this is not a very good design. Groups have these requirements (If they are space capable they are termed fleets otherwise armies. ) Armies can do the following - Disband - Move to location or other group - Do nothing - No order - Transfer to other player Fleets can do the following - Disband - Move to location or other group - Do nothing - No order - Transport ( load / unload) - Lay minefield - Remote Mining ( ?) - Patrol / Intercept ( Patrol aranges an intercept , an intercept executes on the same turn) - Merge with other fleet - Transfer to other player - Mothball In addition to the standard orders groups have a combat order/ stance and a production queue ( if they have production capabilities) . I see 2 options Option 1. Group covers fleets and armies , the state can be checked whether it is a fleet or an army . Option 2 . Group is an abstact class and Army and Fleet are inherited classes. Just interested in peoples opinions , at present it is coded like option 1 but it may not be best . What does everyone think? Ben |