Shouldn't you be using maxy
Fixed, thanks!
I recommend you rename your unit1.pas
Yes, I've fixed this also. Thank you!
this procedure would take quite some time
yes, that's possible, but I'm afraid optimizations will obfuscate the code. Still it'll have to test only 16*16*sqrt(2) combinations in average to find the last remaining tile to place a rabbit, i.e. 360 tests, which is affordable. The other problem is that it will hang up the next moment when there are no free tiles left
Yes, I couldn't resist adding sprites for the snake, but actually I've tried to keep the code as simple and clear as it is possible and separate out any game-specific algorithms.
Fixed possible freezing. Thanks!