You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/gamcorrea/code/python-console-snake/snake/main.py", line 26, in
run()
File "/home/gamcorrea/code/python-console-snake/snake/main.py", line 20, in run
gameloop.start()
File "snake/gameloop.py", line 44, in start init()
File "snake/gameloop.py", line 63, in init
graphics.draw_game()
File "snake/graphics.py", line 85, in draw_game
draw_borders()
File "snake/graphics.py", line 106, in draw_borders
draw_tile(x, y_top - 1, tile_h, color)
File "snake/graphics.py", line 15, in draw_tile
screen.addstr(y, x, tile, color)
_curses.error: addstr() returned ERR
After running some tests, I got to the conclusion that there was nothing wrong with the code, but with the enviroment (Terminal).
The script runs perfectly if the Terminal is at it's full size, or enough size for the game to fit in.
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/gamcorrea/code/python-console-snake/snake/main.py", line 26, in
run()
File "/home/gamcorrea/code/python-console-snake/snake/main.py", line 20, in run
gameloop.start()
File "snake/gameloop.py", line 44, in start init()
File "snake/gameloop.py", line 63, in init
graphics.draw_game()
File "snake/graphics.py", line 85, in draw_game
draw_borders()
File "snake/graphics.py", line 106, in draw_borders
draw_tile(x, y_top - 1, tile_h, color)
File "snake/graphics.py", line 15, in draw_tile
screen.addstr(y, x, tile, color)
_curses.error: addstr() returned ERR
After running some tests, I got to the conclusion that there was nothing wrong with the code, but with the enviroment (Terminal).
The script runs perfectly if the Terminal is at it's full size, or enough size for the game to fit in.
The text was updated successfully, but these errors were encountered: