fruitInterface - VadimKachevski/OOP_Ex3 GitHub Wiki
package MydataStructure
fruitInterface –
This is an interface which specify the behavior of a Fruit by these methods:
-
public void setOccupied(boolean occupied)- Sets if the fruit is targeted by a bot
-
public boolean getOccupied() -returns if the fruit is targeted by a bot
-
public void setGraph(graph g) Sets the graph for the fruit
-
public void setType(int type) sets the type of the fruit -1 or 1
-
public int getType() = return the type of the fruit -1 or
-
public edge_data getEdge() return the edge that the fruit is currently on
-
public void setEdge(edge_data edge) - sets the edge
-
public Point3D getPos() - retuns the position of the fruit using Point3D
-
public void setPos(Point3D pos) - Sets the position of the fruit
-
public int getValue() - return the value of the fruit
-
public void setValue(int value) - sets the value of the fruit
-
public void initFromJson(String json) - with a given String tries to init the fruit of the json data