traverseLevel method
Implementation
void traverseLevel(State state) {
var queue = state.queue;
var levelQueue = queue.drain();
while (levelQueue.length() != 0) {
state.iterations++;
NodeOutput item = levelQueue.shift();
traverseItem(item, state, levelQueue);
}
}