From f6ae1f26d8c3da7300d8e7bf541814f344e0acaa Mon Sep 17 00:00:00 2001 From: OFF-0-1 Date: Wed, 20 Jan 2021 20:44:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=A0=88=EB=B2=A8=EB=B3=84=20=EC=86=8D?= =?UTF-8?q?=EB=8F=84=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snake.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snake.py b/snake.py index 14fd8c97..df3f077a 100644 --- a/snake.py +++ b/snake.py @@ -11,6 +11,8 @@ cols = 25 rows = 20 +clock = pygame.time.Clock() + class cube(): rows = 20 @@ -88,6 +90,10 @@ def move(self): self.turns.pop(p) else: c.move(c.dirnx,c.dirny) + + level = int(len(self.body) / 5) + fps = 6 + (2*level) + clock.tick(fps) def reset(self,pos): From c02a033f1913bf8841022785989490816784b3bc Mon Sep 17 00:00:00 2001 From: OFF-0-1 Date: Wed, 20 Jan 2021 20:49:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=A0=88=EB=B2=A8=EB=B3=84=20=EC=86=8D?= =?UTF-8?q?=EB=8F=84=EC=A1=B0=EC=A0=88=20=EC=B5=9C=EC=A2=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snake.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snake.py b/snake.py index 14fd8c97..49f1bfc7 100644 --- a/snake.py +++ b/snake.py @@ -11,6 +11,7 @@ cols = 25 rows = 20 +clock = pygame.time.Clock() class cube(): rows = 20 @@ -88,6 +89,10 @@ def move(self): self.turns.pop(p) else: c.move(c.dirnx,c.dirny) + + level = int(len(self.body) / 5) + fps = 5 + (2*level) + clock.tick(fps) def reset(self,pos): From dfc38553cdb33a1e4d8df95686a904232a8f1b7e Mon Sep 17 00:00:00 2001 From: hjver123 Date: Wed, 20 Jan 2021 22:20:05 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EB=A0=88=EB=B2=A8=2040=20=EB=8B=AC?= =?UTF-8?q?=EC=84=B1=EC=8B=9C,=20=EC=A2=85=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snake.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/snake.py b/snake.py index 14fd8c97..a42300c1 100644 --- a/snake.py +++ b/snake.py @@ -193,6 +193,4 @@ def main(): redrawWindow() main() - - - + \ No newline at end of file