Update terminis.py

This commit is contained in:
adrienmalin 2019-02-20 17:43:18 +01:00
parent 06839d4ee3
commit f3b11c67cb

View File

@ -694,13 +694,13 @@ class Game:
for tetromino_class in self.TETROMINOES: for tetromino_class in self.TETROMINOES:
curses.init_pair(tetromino_class.COLOR, tetromino_class.COLOR, curses.COLOR_BLACK) curses.init_pair(tetromino_class.COLOR, tetromino_class.COLOR, curses.COLOR_BLACK)
for y, word in enumerate((("GA", "ME") ,("OV", "ER")), start=Matrix.NB_LINES//2): for y, word in enumerate((("GA", "ME") ,("OV", "ER")), start=Matrix.NB_LINES//2):
for x, char in enumerate(word, start=Matrix.NB_COLS//2-1): for x, syllable in enumerate(word, start=Matrix.NB_COLS//2-1):
color = self.matrix.cells[y][x] color = self.matrix.cells[y][x]
if color is None: if color is None:
color = curses.COLOR_BLACK color = curses.COLOR_BLACK
else: else:
color |= curses.A_REVERSE color |= curses.A_REVERSE
self.matrix.window.addstr(y, x*2+1, char, color) self.matrix.window.addstr(y, x*2+1, syllable, color)
self.matrix.window.refresh() self.matrix.window.refresh()
curses.beep() curses.beep()
self.scr.timeout(-1) self.scr.timeout(-1)