It looks like you read the json file several times. You may be able to reduce duplication by parsing the tiles only once, then passing around an array or dictionary into each function that needs it, rather than reading the file many times.
Let me know if you have any questions about how to go about doing this!
It looks like you read the json file several times. You may be able to reduce duplication by parsing the tiles only once, then passing around an array or dictionary into each function that needs it, rather than reading the file many times.
Let me know if you have any questions about how to go about doing this!