ACTUALLY IMPORTANT CHANGES: - rewrote checks for invalid answers under 'start procedure' to be more simplified (same -> 1-9 -> invalid) instead of (1-9 -> invalid -> same -> invalid) - also added a check for negative numbers so they get flagged as invalid - removed checks for invalid answers from 'when flag clicked' because 'start procedure' already checks for invalid answers - added variable 'answer /i' so input can be edited if someone wants to (e.g. add x to 'answer /i') - simplified the math for finding x: 0 - ((p * G) / (G / 2)) - CAM X) -> 0 - (2p - CAM X), did the same for finding y under 'print// grid spacing: pixels' - made 'start procedure' call itself if there's an invalid answer instead of using 'Loading done?' - removed 'Loading done?' because it is now useless - made the grid left to right, top to bottom instead of bottom to top - for some reason the response 'the same' stopped working, so I reused 'GRID SIZE' to update only when 'answer' is a valid number and keep the code working - replaced all 'sqrt of length of GRID' with 'GRID SIZE' because they're always the same - removed the check for offscreen tiles since tiles could be partially on screen if this is untilised for a game PERSONAL PREFERENCE CHANGES - changed 2p under 'print// grid spacing: pixels' to 4p because it conveniently centers the grid at 9 * 9 so it looks nice - changed 'pixels' in 'print// grid spacing: pixels' to 30 because everything fits on screen that way - reorganised where the code blocks are because i felt like it - changed 'current x' and 'current y' to 'current grid x' and 'current grid y' for easier understanding KNOWN BUGS - if input is a number combined with any string (e.g. 3 trillion) the code just won't work - If input had a decimal (e.g. 5.5) it will print a grid with the rounded answer but is offset really weird
my friend @awesome-rabbit made this grid engine and got me to try fix up some stuff i might update this someday use this however you want