MyGame - YosefTwito/PackIt GitHub Wiki
-
This class represents the game.
-
We need to fetch the amount of robots and fruits.
-
Than we need to implement the game as expected.
-
One implementation is an auto-play with directed scenario according to the files.
-
Another is manual-play where we decide where to point the robot.
-
The class also has algorithms to play the auto-player.
-
@authors YosefTwito and EldarTakach
- fruitToEdge(Fruit f ,graph g) - Computes the edge that the fruit that has been given is sitting on.
- robo_update(int mode) - updates the location of the robots, also in charge of manuring the robots in case of manual play.
- fru_update() - updates the location of the fruits.
- Score(ArrayList) - computes the score of each robot and the total score of the player.
- nextNodeManual(Robot r,int src,int dest) - checks if the manual player chose a valid move and preforms it.
- nextNode() - random walk on the graph.
- goNext() - calculates the node that its best to go to.
- goGo() - the main driver of the game.