Let Objects Handle Themselves
Give each agent its own class with move() and display() methods encapsulating its full behavior, then loop over an array of instances calling move() and display() on each.
Give each agent its own class with move() and display() methods encapsulating its full behavior, then loop over an array of instances calling move() and display() on each.