From bdcbf967ad58880b0990eaa4105073ce5458bf1f Mon Sep 17 00:00:00 2001 From: hackehunt <70676275+hackehunt@users.noreply.github.com> Date: Wed, 30 Sep 2020 20:52:40 +0530 Subject: [PATCH] Update snake.py --- snake.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/snake.py b/snake.py index 14fd8c97..f1e62c95 100644 --- a/snake.py +++ b/snake.py @@ -5,13 +5,15 @@ import tkinter as tk from tkinter import messagebox +--------------------------------------- + width = 500 height = 500 cols = 25 rows = 20 - +#-------------------------------------- class cube(): rows = 20 w = 500 @@ -42,7 +44,7 @@ def draw(self, surface, eyes=False): pygame.draw.circle(surface, (0,0,0), circleMiddle2, radius) - +#-------------------------------------- class snake(): body = [] turns = {} @@ -120,7 +122,7 @@ def draw(self, surface): c.draw(surface, True) else: c.draw(surface) - +#---------------------------------------------- def redrawWindow(): @@ -160,7 +162,7 @@ def randomSnack(rows, item): break return (x,y) - +#----------------------------------------------- def main(): global s, snack, win