Skip to content

MyFruit

Orgamliel7 edited this page Jan 16, 2020 · 1 revision

This class represents the "prizes" that the robot is supposed to collect during the game. Our chosen robot is the famous soccer player Cristiano Ronaldo. Accordingly, the prizes are the goblet of Gold and a football.

note: each prize have different score

  • Single-Sided edible direction, because it's directed graph.

We have 3 constructors in the class:

  1. defalut constructor - MyFruit() - initialize all fileds to zero/null.
  2. MyFruit(graph g) - initialize the graph to be g.
  3. public MyFruit(edge_data edge,Point3D pos,int val,int type, graph g).

We also have function that allow us to read and create fruit from Json file using initFromJson(String jsonString).

fruit fruit

Clone this wiki locally