widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03802
Re: [Merge] lp:~widelands-dev/widelands/ai-scheduler into lp:widelands
Set elements are pairs of <key, value>. Just use the duetime as the key and the job type as the value, and your entries will automatically be sorted by duetime. Pop the next job off the front and insert a new check of the same job type into the set with the new duetime and you will have everything you need.
What you need to watch out for is when two jobs get sceduled at the same time, because they would have the same key. To avoid this, you can use the set's count() function to check and increment the duetime if needed.
--
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.
Follow ups
References