> > > for the $play_data variable I do not have the class implemented. > > Basically this holds the user/session info, and implementing this in > > object model will take a significant amount of time. Should I start > to > > work on this now? > > Yup, that's an issue. If it takes you a lot of time, I don't think you > should start changing this now. Maybe it's a good time to start having > a > hard look at the code structure, and maybe spend the necessary time > during one of the next iterations to update the code and make it match > the totality of the requirements (OO, no globals, data objects, etc.). > Otherwise this will increasingly become an issue. > > If you had to do this, how much time would it take you? [Vlad] this is my feeling also. As we add additional features to the code, it becomes harder and more time consuming to change the structure to OO and data objects. As far as estimating how much time it will take, I think in 2 days I can implement the OO code for the user / session. For data objects I'm not so sure, but my guess is that once I implement it for a particular case, it will be easy to replicate throughout the code. So, maybe a day for the first one and another day or two for the rest of them. > > > > [Vlad] I can move the construct in the abstract class. There is a > > problem with moving the clear_action() function. This function is not > > automatically called regardless of the circumstances. For example, in > > the function home_hacked I have a couple of conditions. If they are > > not met, the function returns false and the action is not cleared > (the > > mission still waits for the same action). This is why I don’t think > > that moving the clear action to the constructor will work > > Do you the false return value? Because that can be what prevents the > action to be cleared when an action is triggered. When you call the > corresponding method, you could: > > 1. Remove the action from the queue (to prevent the user to > trigger > the same action twice if the method takes some time to be > executed) > 2. Call the method > 3. Look at the method return value - by default do nothing, if > false re-add the action to the queue (with the same flags and > everything - so you probably want to store the action details > before removing it from the queue in 1.) > > Or am I missing something? [Vlad] I will give it a try. I think it will work [
_______________________________________________ Hackit Bar mailing list - [email protected] Wiki: http://community.hackit.cx/ List: http://community.hackit.cx/ml/ Forum: http://community.hackit.cx/forum/ Ideas: http://community.hackit.cx/ideas/ IRC: irc://irc.freenode.net/#politis
