This repository was archived by the owner on Mar 31, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. This is my first pull request :)
There was a problem when performing a join() on a set of tiles generated when the number of cols and rows is specified, as opposed to calculated automatically from the total number of tiles. So for instance if col=6 and row=4 then join() would call calc_columns_rows(len(tiles)) at some point which would return col=4 and row=6, since the automatic calculations default to a higher number of rows.
I changed calc_columns_rows() to calculate rows and columns based on tile.coords to make it fool proof. As for the automatic calculations I moved them to the slice() function since in all likelihood they will only be run once. My code is not very elegant but I could not think of an obvious way to add cols and rows as global variables and did not want to add them to every Tile.