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