diff --git a/.gitignore b/.gitignore index 168b9a9..706fc71 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ **/**.pyc **/**.egg-info docs/_site/ -.idea/** \ No newline at end of file +.idea/** +tests/test.nvm \ No newline at end of file diff --git a/uvn_fira/api/info.py b/uvn_fira/api/info.py index fbe574a..76478bd 100644 --- a/uvn_fira/api/info.py +++ b/uvn_fira/api/info.py @@ -43,7 +43,7 @@ def get_level_information(level, fn_path="", **kwargs): if "config_file" in kwargs \ else path.join("core", "src", "minigame", "levels", ("level%s.toml" % (level))) w_info = CSWorldConfigReader(conf, **kwargs) - writer = CSNadiaVMWriter(path.join(fn_path, "compiled", ("adv_lvl%s.nvm" % (level))) + writer = CSNadiaVMWriter(path.join(fn_path, "compiled", ("adv_lvl%s.nvm" % (level)))) world = CSWorld(from_data=w_info.data) player = CSPlayer(in_world=world, vm=writer) return player, world diff --git a/uvn_fira/core/grid.py b/uvn_fira/core/grid.py index 3c9836f..5c006a9 100644 --- a/uvn_fira/core/grid.py +++ b/uvn_fira/core/grid.py @@ -83,8 +83,9 @@ def as_list(self): grid. """ coordinates = [] - for row in range(len(self.grid) - 1): - for column in range(len(self.grid[0]) - 1): + rows, columns = self.shape() + for row in range(rows): + for column in range(columns): if self.grid[row][column] is not None: coordinates.append((row, column)) return coordinates