1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Fix serious problems with 'arc anoid'

Summary: https://github.com/facebook/arcanist/issues/48

Test Plan: hmm

Reviewers: alanh, tuomaspelkonen

Reviewed By: tuomaspelkonen

CC: aran

Differential Revision: https://secure.phabricator.com/D3244
This commit is contained in:
epriestley 2012-08-10 15:16:02 -07:00
parent a31d88ee82
commit 6b0af26b94

View file

@ -135,7 +135,12 @@ def main(stdscr):
curses.init_pair(i, i, 0) curses.init_pair(i, i, 0)
curses.curs_set(0) curses.curs_set(0)
curses.raw() curses.raw()
height, width = stdscr.getmaxyx() height, width = stdscr.getmaxyx()
if height < 15 or width < 30:
return 1
status = curses.newwin(1, width, 0, 0) status = curses.newwin(1, width, 0, 0)
height -= 1 height -= 1
game = curses.newwin(height, width, 1, 0) game = curses.newwin(height, width, 1, 0)
@ -197,6 +202,11 @@ def main(stdscr):
status.refresh() status.refresh()
time.sleep(0.05) time.sleep(0.05)
curses.wrapper(main) res = curses.wrapper(main)
print ('You destroyed %s blocks out of %s with %s deaths.' % if res == 1:
print ("Your computer is not powerful enough to run 'arc anoid'. "
"It must support at least 30 columns and 15 rows of next-gen "
"full-color 3D graphics.")
else:
print ('You destroyed %s blocks out of %s with %s deaths.' %
(Block.killed, Block.total, Ball.killed)) (Block.killed, Block.total, Ball.killed))