Just looking at the flood fill algorithm to see how fast it fills. It fills only the centre of the screen (100*100 points) just because of the speed of operation. It fills white space and stops if it meets other colours. The Touching block is used to see the space but I am not sure how accurate it is.