File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 3030import gc
3131import math
3232import time
33- import board
3433import displayio
34+ try :
35+ import board
36+ except :
37+ print ("[adafruit-turtle.py]: Couldn't import board module." )
3538
3639__version__ = "0.0.0+auto.0"
3740__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_turtle.git"
@@ -80,7 +83,7 @@ def __init__(self):
8083 pass
8184
8285
83- class Vec2D (tuple ):
86+ class Vec2D ():
8487 """A 2 dimensional vector class, used as a helper class
8588 for implementing turtle graphics.
8689 May be useful for turtle graphics programs also.
@@ -94,8 +97,8 @@ class Vec2D(tuple):
9497 # k*a and a*k multiplication with scalar
9598 # |a| absolute value of a
9699 # a.rotate(angle) rotation
97- def __init__ ( self , x , y ):
98- super (). __init__ (( x , y ) )
100+ def __new__ ( cls , x , y ):
101+ return ( x , y )
99102
100103 def __add__ (self , other ):
101104 return Vec2D (self [0 ] + other [0 ], self [1 ] + other [1 ])
You can’t perform that action at this time.
0 commit comments