Skip to content

rafasu4/Ex2---OOP

Repository files navigation

Ex2

Description

This project is devided into two: first part concern of building a weighted and directed graph, while the second part focuses on a game which uses the first part.

Part 1:

  1. NodeData
  2. EdgeData
  3. Geo_Location
  4. NodeData_Json
  5. NodeForHeap
  6. DWGraph_DS
  7. DWGraph_Algo
  8. DWGraph_DSJsonDeserializer

1. NodeData

This class represents a node in a graph. Each node has its own weight, id and location in a 2 dimensional space. Inner class in DWGraph_DS.

2. EdgeData

This class representsan edge in a graph. Each EdgeData object has a source and destination node and weight. Inner class in DWGraph_DS.

3. Geo_Location

A Geo_Location object has 3 parameters: x, y, and z. this parameters help locating a node in the 3 dimensional space (in this assignment, 2 dimensional space). Inner class in DWGraph_DS.

4. NodeData_Json

This class is used to save & load the graph in Json format. Inner class in DWGraph_DS.

5. NodeForHeap

This class represents a Node that hold distance and Node that object used by the "dijkstra algorithm". Inner class in DWGraph_DS.

6. DWGraph_DS

This class represents a directional weighted graph. Each graph builds from nodes that are connected by edges objects. Implements directed_weighted_graph interface.

7. DWGraph_Algo

This class holds a collection of more complex methods for DWGraph_DS object. To run a method, one must creat a DWGraph_Algo instance, and initiating it with DWGraph_DS object using init method.

8.DWGraph_DSJsonDeserializer

This class used in order to deserialize Json's graph object. Using this class enable performing deserialization of interface implementation classes.

Part 2:

  1. Arena
  2. CL_Agent
  3. CL_Pokemon
  4. Ex2
  5. GuiFrame
  6. GuiPanel
  7. MyLabel

1. Arena

This class represents a multi Agents Arena which move on a graph and grabs Pokemons. Given class from OOP course.

2. CL_Agent

This class represents an agent that runs on the graph and catches pokemons.

3. CL_Pokemon

This class represents a pokemon in the game.

4. Ex2

This class is the main class in the second part, which its main method the game starts.

5. GuiFrame

This class represents a specific adapted JFrame to this project.

6. GuiPanel

This class represents a specific adapted JPanel to this project.

7. MyLabel

This class represents a specific adapted JLabel to this project.

Running The Game

  • Go to src->gameClient.
  • Run Ex2.
  • In the poping window, enter your id and the wanted level.
  • Press enter.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages