now fix the timeout when you increase your score

master
kirbylife 2019-11-11 23:45:28 -06:00
parent 4861f06233
commit d7996f0d4d
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ class Afutc:
down = self.board[i + 1:]
new_row = np.zeros(shape=(1, WIDTH))
self.board = np.concatenate((new_row, upper, down))
self.score += (10 * count) + (5 if count > 3 else 0)
if count:
self.score += (10 * count) + (5 if count > 3 else 0)
self.stdscr.timeout(1000 - self.score)
# Generate a new piece
self.current_move.fill(0.)