diff --git a/Program's_Contributed_By_Contributors/Python_Programs/Snake game.py b/Program's_Contributed_By_Contributors/Python_Programs/Snake game.py new file mode 100644 index 0000000000..471bb11913 --- /dev/null +++ b/Program's_Contributed_By_Contributors/Python_Programs/Snake game.py @@ -0,0 +1,57 @@ +#snake game +from turtle import * +from random import randrange +from freegames import square,vector + +food = vector(0,0) +snake=[vector(10,0)] +aim=vector(0,-10) + +def change(x,y): + aim.x= x + aim.y =y + +def inside(head): + "Return True if head inside boundaries" + return -200