Added much better pixel recognition for the numbers, using 3 pixels per square to determine the number. Also removed the second if statement in the fillMineGrid function in the for loops, which seems to have made it much, much quicker. Somehow, the speed of the fillMineGrid function went from about 1.5 seconds to probably less than 0.2. Will have to investigate the reason for this. The fillMineGrid function was what was making it really slow, mainly in the double for loop. Also added code to solve a situation when all bombs have been flagged, and to click on all unknown squares after this. Updated colour values as well, 5 and 6 are working much better. Added more constants for readability. Won the first game ever, on its own. Need to add multitherading and bug fix.