dotfiles/.config/Code/User/History/-4c5a7b2f/afar.py
RafayAhmad7548 4f46de8d00 update
2024-09-09 16:59:28 +05:00

27 lines
No EOL
539 B
Python

import random
class Player:
def __init__(self, name: str) -> 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('rafay')
game.display()