← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/tibor-ai5 into lp:widelands

 

> Still my opinion holds - it is more complicated via messages.

Maybe - but having an inconsistent architecture would make the code very
hard to read for everybody else. We also need to consider encapsulation
- the Productionsite shouldn't know anything about the AI, and we should
try to avoid and AI specific stuff there if at all possible.

Maybe you can keep a global container in the AI with production sites +
failed attempts / any other persistent data you need - only for those
that have already triggered notifications, of course. Since all
MapObjects have an ID, fetching them from the container should be quite
efficient.

You could also expand the new Notification struct that I created for you
in the Productionsite with more member variables if you need more
information from the Productionsite that has already been calculated
there anyway.

-- 
https://code.launchpad.net/~widelands-dev/widelands/tibor-ai5/+merge/228762
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/tibor-ai5.


References