Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions snake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -42,7 +44,7 @@ def draw(self, surface, eyes=False):
pygame.draw.circle(surface, (0,0,0), circleMiddle2, radius)



#--------------------------------------
class snake():
body = []
turns = {}
Expand Down Expand Up @@ -120,7 +122,7 @@ def draw(self, surface):
c.draw(surface, True)
else:
c.draw(surface)

#----------------------------------------------


def redrawWindow():
Expand Down Expand Up @@ -160,7 +162,7 @@ def randomSnack(rows, item):
break

return (x,y)

#-----------------------------------------------

def main():
global s, snack, win
Expand Down