Browse Source

- Bit of optimization for the routes and the missing locations

plan_generation
Dan 1 year ago
parent
commit
b0149dbcf0
  1. 4
      routes/Gold_Silver_Route.py
  2. 3
      ui/workers/route_solve_worker.py

4
routes/Gold_Silver_Route.py

@ -127,9 +127,9 @@ def get_gold_silver_desc() -> PokemonGameDesc:
kanto_stage: RouteStage = RouteStage(
"Kanto",
get_kanto_route(),
nx.compose(get_johto_route(), get_kanto_route()),
NEW_BARK_TOWN,
INDIGO_PLATEAU,
MT_SILVER,
[BOULDER_BADGE, CASCADE_BADGE, THUNDER_BADGE, RAINBOW_BADGE, MARSH_BADGE, SOUL_BADGE, VOLCANO_BADGE, EARTH_BADGE],
set(),
[NEW_BARK_TOWN, CHERRYGROVE_CITY, VIOLET_CITY, AZALEA_TOWN, GOLDENROD_CITY, ECRUTEAK_CITY, OLIVINE_CITY, CIANWOOD_CITY, MAHOGANY_TOWN, BLACKTHORN_CITY, PALLET_TOWN, VIRIDIAN_CITY, PEWTER_CITY, CERULEAN_CITY, SAFFRON_CITY, CELADON_CITY, VERMILION_CITY, FUCHSIA_CITY, CINNABAR_ISLAND]

3
ui/workers/route_solve_worker.py

@ -44,6 +44,9 @@ class SolveRouteWorker(QRunnable):
needed_locations = determine_must_visit_locations(plan_json, db, self.initial_data.game_name)
missing_locations = needed_locations - set(initial_plan.path)
for prev_stage in stage_results:
missing_locations = missing_locations - set(prev_stage.path)
# compare those to all the ones we visit in the generated route

Loading…
Cancel
Save