ncurses tetris
This commit is contained in:
parent
ef06cce4c7
commit
45c1a937e4
@ -1,2 +1,6 @@
|
|||||||
numpy
|
numpy
|
||||||
|
|
||||||
|
# Optional Dependencies
|
||||||
|
# For Windows users needing ncurses support:
|
||||||
|
# windows-curses; sys_platform == 'win32'
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ def main(stdscr):
|
|||||||
|
|
||||||
# Handle key inputs
|
# Handle key inputs
|
||||||
key = stdscr.getch()
|
key = stdscr.getch()
|
||||||
if key == ord("q"):
|
if key == ord("Q"):
|
||||||
break
|
break
|
||||||
elif (
|
elif (
|
||||||
key == ord("a")
|
key == ord("a")
|
||||||
@ -143,7 +143,7 @@ def main(stdscr):
|
|||||||
board = clear_rows(board)
|
board = clear_rows(board)
|
||||||
current_piece = PIECES[np.random.choice(piece_types)]
|
current_piece = PIECES[np.random.choice(piece_types)]
|
||||||
i, j = START_POS
|
i, j = START_POS
|
||||||
elif key == ord("g"):
|
elif key == ord("G"):
|
||||||
auto_gravity = not auto_gravity
|
auto_gravity = not auto_gravity
|
||||||
|
|
||||||
# Gravity effect
|
# Gravity effect
|
||||||
|
Loading…
Reference in New Issue
Block a user