Add Snake.reset: send every segment of segments to the off-screen place, empty the list, call create_snake again and set head to segments[0]. Tests with fake segments check that no old segment remains and that the starting positions are used.
Phase: MIL-003
Add `Snake.reset`: send every segment of `segments` to the off-screen place, empty the list, call `create_snake` again and set `head` to `segments[0]`. Tests with fake segments check that no old segment remains and that the starting positions are used.
Phase: MIL-003
Tirsvad
added this to the MIL-003: Continuous play and high score milestone 2026-10-13 08:13:20 +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.
Add
Snake.reset: send every segment ofsegmentsto the off-screen place, empty the list, callcreate_snakeagain and setheadtosegments[0]. Tests with fake segments check that no old segment remains and that the starting positions are used.Phase: MIL-003