Snake Game Algorithm In Python