Classes - naelaboraya/OOP_EX4 GitHub Wiki

In this project we have implemented several classes :

In GraphPack package we used our graph classes from previous project

In Game package we implemented several classes :

  • Agent : This class is used to represent the agents on the graph
    • change_vals : this function reads from json and converts to values to the object.
    • set_next : this function sets the next node destination .
    • get_pos : this function returns the position of the agent .
  • Arena : This class includes the graph and represents the agents and the pokemons as objects (converted from JSON) :
    • pok_from_json : This functions convert pokemons from json
    • agents_from_json : This function converts agents from json
    • pokemon_location : This function returns if the pokemon exist on the edge
  • Pokemon : This class used to represent the pokemons on the graph wich will be hunted during the game :
    • hunted : This function returns if the pokemon is beeing hunted
  • StuddentCode : This is the main class that runs our code , this class communicate between the server and the client and runs our GUI
    • game_begin : This function initializes the game and converts the strings to objects
    • agent_route_initialize : This function initializes the route for agents
    • upcoming_node : This function helps the agents to go to the next node
    • agent_move : This function is used to direct the agent to the next node
⚠️ **GitHub.com Fallback** ⚠️