Well, I am finally at the stage of making the diplomatic statuses, attitudes, and reputations dynamic. (Yay...) So, I basically need to start implementing such things as automatic declaration of war, when a nation attacks another one (i.e. takes over their province or attacks their unit), change of diplomatic status from no contact to peace (or possibly the automatic appearance of the contact screen) when one civ encounters another for the first time, and such.
So, it is time for me to dig into the events model. Unfortunately, this is where the brevity of the javadocs comes in. The descriptions of things are short and unsubstantial, that I cannot quite make out how the system is set up. I mean, if the only comment about class Event is "This is the class for an event" (well duh!) it doesn't really tell me what I am supposed to do with it. So, before I go digging into the code to figure out what's going on, I was thinking that maybe somebody could explain to me the dynamics of the events model in clash in terms of classes. For instance, like this:
"When the game starts up, all events are registered in class X. Then, every turn, class Y checks the state of the game to see if any of the events have occured. If an event has occured, if fires method W.method(), and notifies class X. After which action, class X calls the appropriate methods of the appropriate classes."
That kind of stuff. It would be very helpful, and would save me a lot of time of useless code digging.
Thanks in advance.
(Also, if you feel that this discussion is better held via e-mail, that's no problem at all. )
So, it is time for me to dig into the events model. Unfortunately, this is where the brevity of the javadocs comes in. The descriptions of things are short and unsubstantial, that I cannot quite make out how the system is set up. I mean, if the only comment about class Event is "This is the class for an event" (well duh!) it doesn't really tell me what I am supposed to do with it. So, before I go digging into the code to figure out what's going on, I was thinking that maybe somebody could explain to me the dynamics of the events model in clash in terms of classes. For instance, like this:
"When the game starts up, all events are registered in class X. Then, every turn, class Y checks the state of the game to see if any of the events have occured. If an event has occured, if fires method W.method(), and notifies class X. After which action, class X calls the appropriate methods of the appropriate classes."
That kind of stuff. It would be very helpful, and would save me a lot of time of useless code digging.
Thanks in advance.
(Also, if you feel that this discussion is better held via e-mail, that's no problem at all. )
Comment