Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Jan 17, 2025
1 parent 91b8b21 commit c3a2b76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/generate_map_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
terrain_noise = OpenSimplexCLI(terrain_config)


def _generate() -> tuple[list[float], float]:
def _generate() -> tuple[list[float], float, float]:
print(f'Generating map.. {map_size}x{map_size}')
return terrain_noise.get_2d_array(size=map_size, pos_x=pos_x, pos_y=pos_y)


def main():
map_data, max_height = _generate()
map_data, max_height, min_height = _generate()
_create_img(size=map_size, map_data=map_data, max_height=max_height)


Expand Down
4 changes: 3 additions & 1 deletion opensimplex_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def get_2d_array(
def _tmp_file() -> str:
return f'/tmp/map_{int(time())}_{randint(100, 999)}.json'

def _cli(self, size: int, pos_x: float = 0, pos_y: float = 0, dimensions: int = 2) -> tuple[list[float], float, float]:
def _cli(
self, size: int, pos_x: float = 0, pos_y: float = 0, dimensions: int = 2,
) -> tuple[list[float], float, float]:
t = self._tmp_file()
c = f"""{self.cli} \
-seed {self.cnf.seed} \
Expand Down

0 comments on commit c3a2b76

Please sign in to comment.