snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit 805e533092eb3ad747a7671f2e4ecbd0f83813fb
parent 79d5371457cdedb4ee211c039e49569acaa875ea
Author: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Date:   Sat,  6 Jun 2020 23:53:24 +0000

fixup! Format Python code with psf/black push

Diffstat:
Msnake_games/snakepaint/snakepaint.py | 25++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/snake_games/snakepaint/snakepaint.py b/snake_games/snakepaint/snakepaint.py @@ -32,14 +32,10 @@ class SnakePaint: self._running = True - - def on_execute(self): self.on_init() self.start() - - def start(self): while self._running: keys = pygame.key.get_pressed() @@ -48,14 +44,26 @@ class SnakePaint: self._running = False pygame.event.pump() if e.type == pygame.MOUSEBUTTONDOWN: - self.color = (random.randrange(256), random.randrange(256), random.randrange(256)) + self.color = ( + random.randrange(256), + random.randrange(256), + random.randrange(256), + ) pygame.draw.circle(self._display_surf, self.color, e.pos, self.radius) self.draw_on = True if e.type == pygame.MOUSEBUTTONUP: self.draw_on = False if e.type == pygame.MOUSEMOTION: if self.draw_on: - pygame.draw.circle(self._display_surf, self.color, e.pos, self.radius) - roundline(self._display_surf, self.color, e.pos, self.last_pos, self.radius) + pygame.draw.circle( + self._display_surf, self.color, e.pos, self.radius + ) + roundline( + self._display_surf, + self.color, + e.pos, + self.last_pos, + self.radius, + ) self.last_pos = e.pos - pygame.display.flip()- \ No newline at end of file + pygame.display.flip()