MCPcopy Index your code
hub / github.com/geekcomputers/Python / __init__

Method __init__

Snake Game Using Turtle/snake.py:14–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12class Snake:
13 """ This class creates a snake body and contains methods for movement and extension. """
14 def __init__(self):
15 self.segments = []
16 self.create_snake()
17 self.head = self.segments[0]
18
19 def create_snake(self):
20 """ Creates the initial snake body. """

Callers

nothing calls this directly

Calls 1

create_snakeMethod · 0.95

Tested by

no test coverage detected