Snake Game unfinished
DillFire55
python
2 years ago
1.1 kB
6
Indexable
import random
snake_dir = ">"
apple_x = 14
apple_y = 7
points = 0
board = list(".........................................................................................................................@@>.........*.........................................................................................................................")
for j in range(15):
for i in range(17):
print(board[j * 17 + i], end=' ')
print("")
while True:
while True:
player = input("Type W/A/S/D to move: ")
if (player.lower() == "w" and snake_dir != "v") or (player.lower() == "a" and snake_dir != ">") or (player.lower() == "s" and snake_dir != "^") or (player.lower() == "d" and snake_dir != "<"):
break
if player.lower() == "w":
pass
#update snake x and snake y
if player.lower() == "a":
pass
#update snake x and snake y
if player.lower() == "s":
pass
#update snake x and snake y
if player.lower() == "d":
pass
#update snake_x and snake_y
#print board
Editor is loading...
Leave a Comment