SimpleGameClient - rotemish7/OOP_Ex3-4 GitHub Wiki

Class SimpleGameClient:

This class contains the main functions for the game.

  • moveRobots
  • nextNode
  • GameRunner *autoSetRobots
  • onEdge
  • moveRobotsM(manual)

moveRobots: This function moves the robots in the game to the closest fruit in the game and set its tag to 1 meaning no other robot wil go to him.

nextNode: return the node the robot need to go to next

Gamerunner: gather all the game function together and run the game.

autoSetRobots: First locate the robots in the game, the robots will be close to the fruits.

onEdge: determine on which edge the fruit is located on.

moveRobotsM(manual): manual move the robots in the game.