Implemented food generation and collision detection