Timeline for Jagged array - check if array index is out of range
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 20, 2018 at 22:19 | comment | added | Svp | Thank you so much for thorough answer to my question, the detail in your response is much appreciated. I played around with something similar to this but not as concise or clean. However in the meantime the solution that I found that has worked very well was so simply clamp the rooms upon creation so that I do not end up going outside of the array which was in the problem in the first place. Your answer however has shown me a nice way to clean up the code that sets values for the tiles and gave me good insight into how to do work with jagged arrays in the future. Much appreciated! | |
| Feb 20, 2018 at 22:19 | vote | accept | Svp | ||
| Feb 19, 2018 at 20:17 | history | answered | Zebraman | CC BY-SA 3.0 |