This is the third assignment in the course opject oriented programming, ariel univerisy.
The project is about implementing a directed weithted graph and exploring some graph algorithms.
In the game we place several agent on a graph and their goal is to earn points by catching the random pokemons.
Each pokemon has its value.
For more information, visit the project's wiki tab.
Eyal Levi - GitHub page: github.com/LeviEyal
Moti Dahari - GitHub page: github.com/motidahari
clone the project to your computer and run the file Ex2.jar by the command:
java -jar Ex2
on the same folder as Ex2.jar is on.
the main window of the game will sow up:
Enter your ID and select the level you will to play and click the "play!" button.
Another way to login to the game is by the command:
java -jar Ex2.jar 123456789 7
where 123456789 is your id and 7 is the level you want to play.
This package contains all the implementation of the graph.
it represent the graph as adjacency list using hash maps.
The class DWGraph_DS - Represent the graph implemented as adejency list.
The class DWGraph_Algo - Contaions several algorithms that can be operate on a given graph.
The class EdgeData - Represnts an edge in a graph.
The class NodeData - Represnts a node in a graph.
The class EdgeLocation - Represnts an edge's location in a graph.
The class GeoLocation - Represnts a 3d location.
The package files list:
The class Agent - a pokemon catcher. it has the following properties: position, id, speed, current edge, current pokemon, value.
The class Pokemon - Every pokemon has the following properties: edge (on which the pokemon on), value, type (if the type is -1 so the pokemon lies in a slope), position (3d point), minimum distance (every agent set this to mark the distances to all pokemons), from (the node on this pokemon's edge that "behind" the pokemon), to (the node on this pokemon's edge that "in front" of the pokemon), worth (based on the minimum distance + value)
The class Arena - represents a multi Agents Arena which move on a graph grabs Pokemons and earn points. This is where all the game is happening: the communication with the server, the agent and pokemons updating, the algorithms performs to manipulate the agents. etc.
The class Ex2 - This is the engine class of the game.
The class MyFrame - This class represents the main window of the game
The class MyPanel - This class represents the main panel containing the game
The class ComponentResizer - allows to resize a component by dragging a border of the component.
some variations of the BFS algorithm and dijkstra algorithms.
What is graph: https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
Connectivity of a graph: https://en.wikipedia.org/wiki/Connectivity_(graph_theory)
The shortest path problem: https://en.wikipedia.org/wiki/Shortest_path_problem
The BFS algorithm: https://en.wikipedia.org/wiki/Breadth-first_search