Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
janickr committed Jun 13, 2023
1 parent 4781296 commit c9c0dab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/pygame/pygame-use-buttons-to-move-rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pygame

from kaspersmicrobit import KaspersMicrobit
from kaspersmicrobit.services.accelerometer import AccelerometerData

logging.basicConfig(level=logging.INFO)

Expand Down
4 changes: 2 additions & 2 deletions examples/tkinter/tk-use-accelerometer-to-move-ball.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Ball:

def __init__(self, canvas: Canvas, color):
self.canvas = canvas
self.position = XY((canvas.winfo_width() / 2) - 5, (canvas.winfo_height() / 2) -5)
self.position = XY((canvas.winfo_width() / 2) - 5, (canvas.winfo_height() / 2) - 5)
self.direction = XY(0, 0)
self.id = canvas.create_oval(self.position.x, self.position.y , self.position.x + 10, self.position.y + 10, fill=color)
self.id = canvas.create_oval(self.position.x, self.position.y, self.position.x + 10, self.position.y + 10, fill=color)

def draw(self):
new_position = XY(self.position.x+self.direction.x, self.position.y+self.direction.y)
Expand Down

0 comments on commit c9c0dab

Please sign in to comment.