From: Skullheadx <704277@pdsb.net> Date: Thu, 22 Dec 2022 20:32:27 +0000 (-0500) Subject: LMB Detection + Faster default speed X-Git-Url: http://git.skullheadx.com/nixos/static/tech/index.html?a=commitdiff_plain;h=cc1db0c3859661f3bb8cd0eb2f797137a9a9ab74;p=Snake.git LMB Detection + Faster default speed --- diff --git a/button.py b/button.py index 04e9d42..f45fb82 100644 --- a/button.py +++ b/button.py @@ -28,4 +28,5 @@ class Button(Label): def get_input(self, event): if event.type == pygame.MOUSEBUTTONUP: - self.activated = True + if event.button == 1: # Left Mouse Button + self.activated = True diff --git a/player.py b/player.py index b0881a4..a704a8a 100644 --- a/player.py +++ b/player.py @@ -2,7 +2,7 @@ from setup import * class Player: - move_time = 400 # ms + move_time = 300 # ms min_time = 100 time_decrease = 4