Reverse engineered prompt

GitHub

Build me a simple desktop Snake game in C++ using SDL2, with a clean object oriented structure and a makefile so I can compile and run it easily. I want it to feel like the classic Snake game, where you move the snake with the keyboard, eat food, grow longer, and lose if you hit a wall or your own body. Use the image assets in the project for the visuals instead of leaving it as plain placeholders if possible.

Please organize the code so it is easy to read and maintain, with the game loop, rendering, input handling, and snake logic separated in a sensible way. It should open in a game window, run smoothly, and restart cleanly after game over. Include whatever setup is needed so it works with a typical SDL2 install and can be built with make, especially for a MinGW style setup.

If anything about SDL2 setup is unclear, look up the current docs online and wire it up properly.

Have a live product UI? Try website reverse