MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / drawTwistUpSegment

Function drawTwistUpSegment

src/gamesbyexample/pythons.py:90–109  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

88
89
90def drawTwistUpSegment(length):
91 turtle.begin_fill()
92 turtle.forward(GAP)
93 turtle.left(90)
94 turtle.forward(length - THICKNESS)
95 turtle.right(90)
96 turtle.forward(THICKNESS)
97 final_position = turtle.position()
98 turtle.right(90)
99 turtle.penup()
100 turtle.forward(THICKNESS)
101 turtle.pendown()
102 turtle.forward(length - THICKNESS)
103 turtle.right(90)
104 turtle.forward(THICKNESS + GAP)
105 turtle.end_fill()
106 turtle.penup()
107 turtle.goto(final_position)
108 turtle.pendown()
109 turtle.right(180)
110
111
112def drawTwistDownSegment(length):

Callers 1

drawSnakeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected