snake.c: Change resolution according to map size. Code clean up.