Update Tetris2000.py
Correction to back to back sequence detection
This commit is contained in:
parent
b2416a9e2c
commit
470f219e74
@ -1118,12 +1118,12 @@ class Stats(QtWidgets.QWidget):
|
||||
# ==============================================================================
|
||||
if score:
|
||||
if (t_spin and nb_complete_lines) or nb_complete_lines == 4:
|
||||
if len(self.back_to_back_scores) < 1:
|
||||
if len(self.back_to_back_scores) > 1:
|
||||
self.back_to_back_scores.append(score // 2)
|
||||
else:
|
||||
# The first Line Clear in the Back-to-Back sequence
|
||||
# does not receive the Back-to-Back Bonus.
|
||||
self.back_to_back_scores.append(0)
|
||||
self.back_to_back_scores = [0]
|
||||
elif (nb_complete_lines and not t_spin) or len(
|
||||
self.back_to_back_scores
|
||||
) == 1:
|
||||
@ -1134,7 +1134,7 @@ class Stats(QtWidgets.QWidget):
|
||||
# do not receive the Back-to-Back Bonus; instead they are scored as normal.
|
||||
# They also cannot start a Back-to-Back sequence, however,
|
||||
# they do not break an existing Back-to-Back sequence.
|
||||
if len(self.back_to_back_scores) < 1:
|
||||
if len(self.back_to_back_scores) > 1:
|
||||
b2b_score = sum(self.back_to_back_scores[1:])
|
||||
self.score_total += b2b_score
|
||||
self.nb_back_to_back += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user