Class: QueueManager


This takes the input queues and picks which items to fund with resources until no more resources are left to distribute. Currently this manager keeps accounts for each queue, split between the 4 main resources Each time resources are available (ie not in any account), it is split between the different queues Mostly based on priority of the queue, and existing needs. Each turn, the queue Manager checks if a queue can afford its next item, then it does. A consequence of the system it's not really revertible. Once a queue has an account of 500 food, it'll keep it If for some reason the AI stops getting new food, and this queue lacks, say, wood, no other queues will be able to benefit form the 500 food (even if they only needed food). This is not to annoying as long as all goes well. If the AI loses many workers, it starts being problematic. It also has the effect of making the AI more or less always sit on a few hundreds resources since most queues get some part of the total, and if all queues have 70% of their needs, nothing gets done Particularly noticeable when phasing: the AI often overshoots by a good 200/300 resources before starting. This system should be improved. It's probably not flexible enough.