Open DuanPengfei opened 5 months ago
Thank you for submitting this issue. However, the task of implementing an entire snake game from scratch is too large in scope for Sweep to handle at this time. Sweep is designed to make targeted code changes to an existing codebase in order to fix bugs or add small enhancements. Building a complete game would require writing a substantial amount of new code, which goes beyond Sweep's current capabilities.
To make this issue more suitable for Sweep, please provide the specific codebase you would like the snake game added to, along with details on where in the code the changes should be made. Break down the high-level game requirements into smaller, actionable coding tasks. Sweep will then be better equipped to assist with those targeted code modifications.
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
Implement a snake game
Using HTML & JavaScript to achieve a pure front-end running snake game The size of the screen is 1024 units of length x 1024 units of length square Each unit is 5px long The initial length of the snake is 2 units, increasing by one unit for each apple eaten The size of each apple is 1 unit length x 1 unit length The direction of the snake head is controlled by the W S A D of the keyboard, W is up, S is down, A is left, D is right The snake head can only turn 90 degrees, not 180 reverse turns, such as when it is traveling to the left, it can not suddenly turn to the right, only up or down first Snakes need to operate automatically all the time The screen needs to have a border, the snake head touches the border, or another part of its own body, the game ends