I am developing the game, but I can not plunge into the structure of inheritance. I usually have a good understanding of this, but it has too many overlaps, and I cannot solve all this.
I'm trying to simulate sailing ships - I think Age of Sail. Presumably, therefore, everything expands the class of the vessel.
There are several types of ship types: rowing (galleys, canoes), square installation, front and rear towers with different behavior. Each of them is further subdivided into several other types. I cannot decide if it should be a series of interfaces or extensions of a ship. We also note that there may be some kind of crosshairs (a vessel can be either rowing or square rigged), which makes me think about interfaces?
Ships also have different forms of behavior: merchant ships, military, privateers, and pirates. I really can't decide if it should be an interface or an extension of another class. However, in this case there is no crossover type.
Finally, there are several behaviors that individual ships may have. Merchants can be in convoys (defend themselves) or be independent (run away). Men of war almost always attack, if not much outsmarted ... but they can work in fleets, squadrons, or independently. Teamen and pirates attack only weaker - usually independently, but sometimes in pairs. I assume this should be an interface too?
My big problem is that every ship style (frigate, battleship, etc.) can fulfill almost any of these roles, so I cannot build a simple inheritance structure. The frigate cannot expand military service, as some of them are private individuals. Sloop cannot spread square falsification because some of them are front and aft. etcetc.
Any thoughts would be appreciated, I lost a little end. Thanks