-
Notifications
You must be signed in to change notification settings - Fork 0
GameLogic Package
AmitSheer edited this page Dec 16, 2020
·
12 revisions
Holds classes that communicate with the server and control the game flow.
- Game
control games flow, communicates with the server and updates relevant classes with data from server - GameManager
organizes data from server - Pokemon
Holds data for location and value of pokemon to catch - PokemonTrainer
Holds data for location, current value and path to nearest pokemon
-
Game
-
getKey()
returns the key - _getLocation()
returns node currents location -
getWeight()
returns the weight of the edge -
setLocation(geo_location p)
sets node current location -
setWeight(double w)
sets the node current weight -
getInfo()
returns the info held on graph -
setInfo(String s)
sets the info held in graph -
getTag()
returns current graph tag -
setTag(int t)
sets current graph tag -
toString()
return the node in string form
-
getKey()
-
GameManager
-
getTime()
returns time until game ends -
setTime(Date time)
sets time until game ends -
updateTrainerPath(List<node_data> pathToPokemon, int trainerId)
updates the path a trainer needs to follow to catch a pokemon -
getPokemons()
returns a list of all pokemons -
setPokemons(HashSet pokemons)
sets a new set of pokemons -
setPokemons(String pokemons)
sets a new set of pokemons -
getAlgo()
returns current algo used -
getAlgo()
returns current algo used -
getAlgo()
returns current algo used -
getAlgo()
returns current algo used -
getAlgo()
returns current algo used -
toString()
return the node in string form
-
getTime()
-
GraphParser
-
Json2Graph(JsonReader reader)
converts text in JSON format to Graph and returns it -
Json2Graph(String json)
converts text in JSON format to Graph and returns it -
Graph2Json(directed_weighted_graph graph)
converts graph to JSON format and returns it
-
Json2Graph(JsonReader reader)
-
Tarjan
-
getSccNodes()
returns a list of list, that contains all of the scc in a certain graph -
init(directed_weighted_graph g)
returns if the true if the entire graph is scc
-
getSccNodes()