Hello everyone!
Please help me figure out the issue. Every second, a character is created at a specific point, holding a random number of pizzas that they must deliver to a designated point. There are several points, and the character will choose a point randomly.
The problem is that when the character reaches the point, they do not always deliver the pizza to the designated point. Sometimes another character, who is at a different point, can deliver the pizza instead. It seems that characters can only act in order because if a character reaches the second point, they won’t deliver the pizza until another character reaches the first point.
I would like the characters to act independently of each other, delivering the pizza immediately upon reaching the chosen point. Perhaps you can find the error in my code.