Skip to content

Algorithms

Hadar Bitan edited this page Jan 11, 2022 · 6 revisions

The main algorithms we create in the Algorithms class:

find_edge

In this function we get a pokemon and according to his position we finds his edge.

game_over

In this function we create the final screen and send the client an order to stop the game.

open_game

In this function we create the start screen and send the client an order to start the game.

choose_next_node

In this function we go over every agent and check which pokemon is the closest to the agent, for this calcluate we use the shortest path function from the class GraphAlgo, after we check which pokemon is the closest we use the client function choose_next_edge to sent the agent to cetch the pokemon.

Clone this wiki locally