Dependencies - HelenYunes/OOP-Pokemon-game-Ex2 GitHub Wiki

Directed Weighted Graph

The game is reliant on building a directed weighted graph which represents the map(or arena) for the Pokemons and Agents. In order to build the graph form the JSON provided from the game server's API we used number of classes:

  • Package api

DWGraph_DS (implements interface directed_weighted_graph)

This class represents a directional weighted graph. The class has a road-system or communication network in mind and can support large number of nodes with an efficient implementation.

NodeData (implements interface node_data)

This classrepresents the set of operations applicable on a node (vertex) in a (directional) weighted graph.

EdgeData (implements edge_data)

This class represents the set of operations applicable on a directional edge in a (directional) weighted graph.

GeoLocation (implements geo_location)

This class represents the location(x,y,z) of a point the graph.

DWGraph_Algo (implements dw_graph_algorithms)

This class represents a Directed (positive) Weighted Graph Theory Algorithms including:

  1. clone(); (copy). // deep copy.
  2. init(graph); // initialize.
  3. isConnected(); // to check if all ordered pairs are connected.
  4. double shortestPathDist(int src, int dest); // returns the shortest path distance(double).
  5. List<node_data> shortestPath(int src, int dest); // return a list of nodes of the shortest path from src to dst.
  6. Save(file); // saves the graph in JSON format.
  7. Load(file); // loads the graph from a JSON format.

Game Client

  • Package GameClient

Ex2

This is the main class which the main method is located in. This class also contains the main algorithm to determine which Pokemons are to be caught(and when) and by which agent.

Arena

This class represents a multi Agents Arena which move on a graph and catches Pokemons.

Agent

This class represents an Agent on the graph inside the Arena.

Pokemon

This class represents a Pokemon on the graph inside the Arena.

GUI

This class is responsible for the Graphical User Interface of the game.

⚠️ **GitHub.com Fallback** ⚠️