Arena - YaliToledano/OPP_Maze GitHub Wiki
Arena
class that holds all required data structures for running a stage , the graph, collection of robots and a collection of fruits, are the most important ones.
uses a queue of fruits to store fruits which no robot is going to.
addRobot
adds to the stored list a given robot as a instance of robot.
addRobots/addFruits
gets a list of string of jsons (will be from the server) and creates the list from the jsons.
updateRobots/updateFruits
update all the list with the new data from the list of strings (the json) updates each object accordingly.
setFruitEdge
gets a fruit and decides on what edge it is on it goes over all edges and checks if the the distance to that fruit from each node of the edge equals to the distance between the two nodes.