Add Snake.reset #19

Closed
opened 2026-10-13 08:13:20 +02:00 by Tirsvad · 0 comments
Owner

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
Tirsvad referenced this issue from a commit 2026-10-13 08:34:09 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/024-snake#19