Spaces:
Running
on
Zero
Running
on
Zero
File size: 485 Bytes
3860419 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from model import Point
class View:
def __init__(self, game):
self.game = game
def render(self):
# Print the game state
for y in range(10):
for x in range(10):
if Point(x, y) in self.game.snake:
print("S", end="")
elif Point(x, y) == self.game.food:
print("F", end="")
else:
print(".", end="")
print()
print()
|