Start thinking about your high-level objects and, more importantly, the relationships between these objects.
Here are some of the nouns (the creatures that exist in your simulation):
- World
- Cities
- Crews
- Companies
- Money
Here are some of the verbs (relationships that exist between your nouns):
- Assault / Business Defense
- Active business
- Definition / verification of business requirements (security, capital, etc.)
- Health Check
- Receiving the money
- Money tracking
- Checking the boundaries of the city (crews attack crews in the same city).
- Calculation of capabilities (for attack by crews)
I am sure, probably more. The point is that you need to evaluate what critical things must exist in order for your simulation to be useful.
The calculations for vulnerabilities and opportunities should be somewhat arbitrary, based on the somewhat reasonably safe assumption that you are not a mathematician. Determine what you consider more important in the decision-making process that the crew conducts.
Nouns are really quite straightforward. You just need to carefully consider your data structures to place various objects. Think about how you intend to use objects and use data structures that maximize performance, as well as your ability to be flexible in case changes occur later in the development process.
There is usually a struggle in relationship classes because it is difficult to accurately describe what the process does. Try to follow the SRP (the principle of a single responsibility - the object must have one responsibility, and this responsibility must be fully encapsulated by the class). However, don't be a fan of it. Sometimes this happens when two closely related processes have to be combined together.
GL
source share