Replace # by walls
This commit is contained in:
parent
8818073fc0
commit
2947ffd0c1
|
@ -49,7 +49,7 @@ class Map:
|
|||
|
||||
class Tile(Enum):
|
||||
EMPTY = ' '
|
||||
WALL = '#'
|
||||
WALL = '█'
|
||||
FLOOR = '.'
|
||||
|
||||
def is_wall(self) -> bool:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from .interfaces import Map
|
||||
from .interfaces import Map, Tile
|
||||
from .term_manager import TermManager
|
||||
|
||||
|
||||
|
@ -19,13 +19,13 @@ def proof_of_concept() -> None:
|
|||
|
||||
cur = [1, 6] # (y,x)
|
||||
# We are a squirrel
|
||||
stdscr.addstr(1, 6, '🐿️')
|
||||
stdscr.addstr(1, 6, '🐿')
|
||||
stdscr.refresh()
|
||||
|
||||
while True:
|
||||
# Get movements of the user
|
||||
key = stdscr.getkey()
|
||||
stdscr.addstr(cur[0], cur[1], '.')
|
||||
stdscr.addstr(cur[0], cur[1], Tile.FLOOR.value)
|
||||
next_pos = cur[:]
|
||||
if key == 'z' or key == 'KEY_UP':
|
||||
next_pos[0] = cur[0] - 1
|
||||
|
@ -42,4 +42,4 @@ def proof_of_concept() -> None:
|
|||
if next_tile.can_walk():
|
||||
cur = next_pos
|
||||
# Draw the squirrel
|
||||
stdscr.addstr(cur[0], cur[1], '🐿️')
|
||||
stdscr.addstr(cur[0], cur[1], '🐿')
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
####### #############
|
||||
#.....# #...........#
|
||||
#.....# #####...........#
|
||||
#.....# #...............#
|
||||
#.##### #.###...........#
|
||||
#.# #.# #...........#
|
||||
#.# #.# #############
|
||||
#.# #.#
|
||||
#.#### #.#
|
||||
#....# #.#
|
||||
####.###################.#
|
||||
#.....................# #################
|
||||
#.....................# #...............#
|
||||
#.....................#######...............#
|
||||
#...........................................#
|
||||
#.....................#######...............#
|
||||
####################### #################
|
||||
███████ █████████████
|
||||
█.....█ █...........█
|
||||
█.....█ █████...........█
|
||||
█.....█ █...............█
|
||||
█.█████ █.███...........█
|
||||
█.█ █.█ █...........█
|
||||
█.█ █.█ █████████████
|
||||
█.█ █.█
|
||||
█.████ █.█
|
||||
█....█ █.█
|
||||
████.███████████████████.█
|
||||
█.....................█ █████████████████
|
||||
█.....................█ █...............█
|
||||
█.....................███████...............█
|
||||
█...........................................█
|
||||
█.....................███████...............█
|
||||
███████████████████████ █████████████████
|
||||
|
|
Loading…
Reference in New Issue