-
Notifications
You must be signed in to change notification settings - Fork 0
/
cells.py
33 lines (28 loc) · 1.19 KB
/
cells.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Cell:
"""
Base cell class inherited by all cell types
"""
def __init__(self, cell_name, char, bk_color = "dark gray", color = "white", is_blocked = True, blocks_sight = True):
self.cell_name = cell_name
self.char = char
self.bk_color = bk_color
self.color = color
self.is_blocked = is_blocked
self.blocks_sight = blocks_sight
self.explored = False
# ALL THE CELLS USED IN THE GAME
class Wall(Cell):
def __init__(self):
super().__init__("wall", "▒", is_blocked = True, blocks_sight = True)
class Floor(Cell):
def __init__(self):
super().__init__("floor", ".", is_blocked = False, blocks_sight = False)
class Rock(Cell):
def __init__(self):
super().__init__("rock", "#", is_blocked = True, blocks_sight = True)
class Stair_Down(Cell):
def __init__(self):
super().__init__("stair_down", ">", bk_color = "light blue", color = "light blue", is_blocked = False, blocks_sight = False)
class Stair_Up(Cell):
def __init__(self):
super().__init__("stair_up", "<", bk_color = "light blue", color = "light blue", is_blocked = False, blocks_sight = False)