dotfiles/.config/Code/User/History/-4c5a7b2f/HMka.py

27 lines
527 B
Python
Raw Normal View History

2024-09-09 16:59:28 +05:00
import random
class Player:
def __init__(self, name) -> None:
self.name = name
self.score = 0
self.health = 100
self.x = 0
self.y = 0
class DungeonGame:
def __init__(self) -> None:
self.player = Player()
self.grid = [[],[],[],[],[]]
def grid_init(self):
for row in self.grid:
for col in row:
col = random.choice(['T', 'H', 'E'])
def display(self):
print(self.grid)
game = DungeonGame()
game.display()