widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03801
Re: [Merge] lp:~widelands-dev/widelands/ai-scheduler into lp:widelands
Well it is not so simple.
I thought priority_queue + pairs would do the trick, but I realized that I dont need to remove and add items into queue, instead, all items would be stable, only second member of pair would be changing. And this is not possible with priority_queue.
But I could create pairs under name f.e. dueTimes as job:dueTime, and all these variables like next_economies_check_due_, would be replaced with 'dueTime.at(kCheckEconomies)' and the oldest item (=first member of a pair) in dueTime would be get with some primitive function "out of sight"
--
https://code.launchpad.net/~widelands-dev/widelands/ai-scheduler/+merge/251327
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai-scheduler into lp:widelands.
References