Cars - dean985/taxiDriver GitHub Wiki

Car (Robot)

Robot(int id, Point3D p) - Constructor of a car.

move_to_dest(DGraph dGraph) - move the robot on the graph to the next node.

edge_data edgeOfRobot( graph graph) - This method return the edge the robot is currently on.

robotCollect(graph graph ) - Check if the car collected a gift and adds the gifts value to the car.

Cars (gameRobots)

public gameRobots(graph graph, game_service game) - initialize the cars from robots JSON file

getRobotAmount(game_service game) - returns the amount of cars.

getRobotByID(int id) - return the car from its int id.

nextNode2(game_service game, gameFruits fruits, graph graph, int robot_id, int node_src,boolean auto_mode) - A method to find the next gift for the car. In automatic mode it uses Shortest Path algorithm explained in Maze Waze.