diff --git a/.gitignore b/.gitignore index 2e616cf..b84dfcf 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ lib/ lib64/ parts/ sdist/ +Tetris2000.build/ var/ wheels/ *.egg-info/ diff --git a/Tetris2000.py b/Tetris2000.py index 9efbed4..bd9e412 100644 --- a/Tetris2000.py +++ b/Tetris2000.py @@ -147,7 +147,7 @@ class Matrix(Grid): self.speed = consts.INITIAL_SPEED * (0.8 - ((level - 1) * 0.007)) ** (level - 1) self.fall_timer.start(self.speed) if level > 15: - self.lock_delay *= consts.AFTER_LVL_15_ACCELERATION + self.lock_delay = consts.LOCK_DELAY * (consts.AFTER_LVL_15_ACCELERATION ** (level-15)) def empty_row(self): return [None for x in range(self.COLUMNS)] @@ -1077,6 +1077,10 @@ class Frames(QtWidgets.QWidget): ) ) msgbox.setDetailedText(self.stats.text(full_stats=True)) + # Find and set default the "show details" button + for button in msgbox.buttons(): + if msgbox.buttonRole(button) == QtWidgets.QMessageBox.ActionRole: + msgbox.setDefaultButton(button) msgbox.exec_() diff --git a/consts.py b/consts.py index 1c8cfcc..3eccb7e 100644 --- a/consts.py +++ b/consts.py @@ -38,7 +38,7 @@ ENTRY_DELAY = 80 LINE_CLEAR_DELAY = 80 LOCK_DELAY = 500 TEMPORARY_TEXT_DURATION = 1000 -AFTER_LVL_15_ACCELERATION = 0.85 +AFTER_LVL_15_ACCELERATION = 0.9 # Block Colors BLOCK_BORDER_COLOR = QtGui.QColor(0, 159, 218, 255) diff --git a/propertize/convert_string.py b/propertize/convert_string.py index 86c41f3..059f792 100644 --- a/propertize/convert_string.py +++ b/propertize/convert_string.py @@ -2,7 +2,7 @@ import re -first_cap_re = re.compile('(.)([A-Z][a-z]+)') +first_cap_re = re.compile('([^.])([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])') def snake_case(s):