Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when Merging barren territories: unsupported operand '+' for tuple and int #4

Open
Calendis opened this issue Jun 28, 2017 · 0 comments

Comments

@Calendis
Copy link

Calendis commented Jun 28, 2017

I was generating with the "num_territories" param set to 10, and the size set to 200. It crashed when merging barren territories

Making 10 territories Merging barren territories Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/myusername/.local/lib/python3.5/site-packages/hexgen/__init__.py", line 240, in generate hex_grid = MapGen(params=params, debug=debug) File "/home/myusername/.local/lib/python3.5/site-packages/hexgen/mapgen.py", line 248, in __init__ self.generate_territories() File "/home/myusername/.local/lib/python3.5/site-packages/hexgen/mapgen.py", line 331, in generate_territories if t.avg_temp < 0 and (avg_x / self.hex_grid.size) < 0.5: File "/home/myusername/.local/lib/python3.5/site-packages/hexgen/territory.py", line 47, in avg_temp return round(sum([h.temperature for h in self.members]) / self.size, 2) TypeError: unsupported operand type(s) for +: 'int' and 'tuple'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant