Replace # by walls

This commit is contained in:
Yohann D'ANELLO 2020-10-16 18:20:26 +02:00 committed by Nicolas Margulies
parent d8bd500349
commit 3467fb622c
3 changed files with 22 additions and 22 deletions

View File

@ -51,7 +51,7 @@ class Map:
class Tile(Enum):
EMPTY = ' '
WALL = '#'
WALL = ''
FLOOR = '.'
def is_wall(self) -> bool:

View File

@ -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], '🐿')

View File

@ -1,17 +1,17 @@
####### #############
#.....# #...........#
#.....# #####...........#
#.....# #...............#
#.##### #.###...........#
#.# #.# #...........#
#.# #.# #############
#.# #.#
#.#### #.#
#....# #.#
####.###################.#
#.....................# #################
#.....................# #...............#
#.....................#######...............#
#...........................................#
#.....................#######...............#
####################### #################
███████ █████████████
█.....█ █...........█
█.....█ █████...........█
█.....█ █...............█
█.█████ █.███...........█
█.█ █.█ █...........█
█.█ █.█ █████████████
█.█ █.█
█.████ █.█
█....█ █.█
████.███████████████████.█
█.....................█ █████████████████
█.....................█ █...............█
█.....................███████...............█
█...........................................█
█.....................███████...............█
███████████████████████ █████████████████