Fixes for python linting

This commit is contained in:
ZodiusInfuser 2021-04-23 11:10:55 +01:00 committed by Phil Howard
parent 16106d5596
commit 7b0823d867
1 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,5 @@
import time, random
import time
import random
from breakout_colourlcd240x240 import BreakoutColourLCD240x240
width = BreakoutColourLCD240x240.WIDTH
@ -19,6 +20,7 @@ class Ball:
self.dy = dy
self.pen = pen
# initialise shapes
balls = []
for i in range(0, 100):
@ -30,18 +32,18 @@ for i in range(0, 100):
r,
(14 - r) / 2,
(14 - r) / 2,
display.create_pen(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)),
display.create_pen(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)),
)
)
while True:
display.set_pen(40, 40, 40)
display.clear()
for ball in balls:
ball.x += ball.dx
ball.y += ball.dy
xmax = width - ball.r
xmin = ball.r
ymax = height - ball.r