 |
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:14
|
|
Square Ownership:
I was just working/thinking along the same lines today... here's something I just emailed you for a start, and then I'll add some comments from there.
From email:
I have run into a problem with the bookkeeping that goes on when a square changes hands. What was done previously wasn't complete in the things it changed. That's why the econ stuff didn't know who was in charge. But I'm not sure you'll like what I've done . I will send it when I have a little to think about it and make some tests. The kludge I used may be ok for D5, and I think things need refactoring a bit in the govt object hierarchy anyway after D5. My thought post D5 was to simplify MapSquare a bit by having it only know what Province it belongs to. When a square's civ is needed it could then ask thru the province. This seems cleaner to me. What do you think of the idea in general?
{end email}
Now some clarifications:
1. The econ hierarchy now works Directly using the govt hierarchy. I made those changes a few weeks ago with the GovernmentEntity change we went over. I may be missing your meaning here... since at present the only linkage is that each GovernementEntity has an Economy object associated with it. It may be done poorly in the new fashion, but I agree the old econ parallel hierarchy should be history, and from now on economy objects should attached directly to, and derived from the Civilization, Province, or MapSquare they're associated with.
2. I don't have time or brainpower to work on the code tonite, so I will just ship it off to you. I brought back Civ.addTerritory for my own uses, and also modified Province.setControllingCiv and MapSquare.setControllingCiv. It seemed to work, but I think its probably best to just refactor the ownership hierarchy. One thing I am sure of, is that adding a square should be done at the civ level, because the civ will need to choose which province (or a new one) it wants to put the square in. This will become important when we go to a fully-populated map as opposed to the cities-in-a-void we have now.
3. I suggested a way in the quoted email that I think is what you are considering also. A simple hierarchy where a square only knows what province its part of, and a province knows the civ its associated with. This seems to me much cleaner. Just go ahead and refactor that hierarchy in whatever way seems best, although I have to admit that I'm hoping you want to do it the way I do. What we have now can be very confusing, as you noted. If you can send me back a refactored version by midnight tonite your time, I can take it to work and do some testing there, and make sure the econ part is done right once the fundamental hierarchy architecture part is done. One further idea is to use more fully the GovernmentEntity interface that's already there.
4. For testing we really need to see for each square what its location is, what its province is, and what its civ is. (We already have most in Details) In addition we need to make sure the econ windows pop up with the square, prov, or civ as advertised, athough I can worry about that if you don't get to it.
The AI changes sound Good! But lets draw the line at those, and the issue above. Each new tweak means potential new bugs, and it could go on forever...
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|