Copy src/snake_game/snake.py and tests/test_snake.py from the base: create_snake, add_segment, extend, move, hits_wall, hits_tail, up, down, left, right, the segments list and the head. The tail check loops over the slice segments[1:]. snake.py does not import turtle until a real segment is made, so the tests pass fakes.
Phase: MIL-002
Copy `src/snake_game/snake.py` and `tests/test_snake.py` from the base: `create_snake`, `add_segment`, `extend`, `move`, `hits_wall`, `hits_tail`, `up`, `down`, `left`, `right`, the `segments` list and the `head`. The tail check loops over the slice `segments[1:]`. `snake.py` does not import `turtle` until a real segment is made, so the tests pass fakes.
Phase: MIL-002
Tirsvad
added this to the MIL-002: Adopt the game milestone 2026-10-08 11:05:15 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Copy
src/snake_game/snake.pyandtests/test_snake.pyfrom the base:create_snake,add_segment,extend,move,hits_wall,hits_tail,up,down,left,right, thesegmentslist and thehead. The tail check loops over the slicesegments[1:].snake.pydoes not importturtleuntil a real segment is made, so the tests pass fakes.Phase: MIL-002