Game_state.find_path_to_edge() outputs wrong path

game_state is a python object. game_state.fubar is some function or property of that object. There is concept of a function or property called ‘advanced’ inside of Gamestate, so attempting to use game_state.advanced will throw an exception.

AdvancedGamestate is another class which inherits from Gamestate. In order to use AdvancedGamestate, you need to instantiate an object of that type, the same way we do so with game_state.

huh? Sorry, I am new to this, what do you mean by instantiate an object? and how do I do that?

A class is a ‘blueprint’, in an RPG game we would have a class called ‘enemy’
Instantiate means ‘Create an instance of’.
An object is a specific instance of a class. Each enemy in a dungeon would be an object which was instantiated from the ‘enemy’ class.

You can google around and learn lots of information on object oriented programming. There are tons of online resources that are very helpful for learning. For Terminal, you should research python basics and object oriented programming in python. (We will be releasing other languages starter algos soon)

so how do I import advanced game state?

You should be able to figure that out from here, it is just like importing any other file:

In the default starterkit, where game_state is initialized, just change “GameState” to “AdvancedGameState” and it should work.

To keep threads on-topic, please ask questions not related to the current topic in their own thread. I will be removing off-topic questions in the future.