- Updated Tuesday, March 25th 2014 @ 09:30:43
Yesterday when I realized I can look at it from another perspective, I was blown away.
What I'm talking about is that it is possible to program attacking/transfering in (at least) 2 ways.
At first, I was going with "what are the best actions that I can do from each region with respect to capturing".
I then realized that it is also possible to consider it from the other end: "for each enemy territory in sight, what is the best course of action".
Have you guys gone through a similar process? Which approach do you like more? Do you even dare to say that one is better than the other?
- Created Tuesday, March 25th 2014 @ 18:23:18
Well, yeah. You SHOULD check each of your territories for neutral, enemy, and friendly neighbors. I use this information to determine the best course of action based on what I have coded as the "best option" for that territory. There are many, many, many factors that have to go into making the decision as what to do with a stack.
For instance, if I'm nose-to-nose with an enemy force, but there is a neutral territory next to me, I do several calculations to see if I can add to my stack, attack the neutral, and still have enough armies to survive an attack from the opponent. If anything comes out false, I'll leave my stack there and wait until things get calculated out again the following round.
- Created Tuesday, March 25th 2014 @ 18:32:38
The 2 ways I mention are as far as I can see going to get close to the same result, however, they really make the implementation / code / focus different.