fix T-Spin detection

This commit is contained in:
adrienmalin 2018-08-21 20:17:32 +02:00
parent d7cd0ce82b
commit 65a25c997b

View File

@ -344,14 +344,9 @@ class TetroT(Tetromino, metaclass=MetaTetro):
c = not self.matrix.is_empty_cell(pc) c = not self.matrix.is_empty_cell(pc)
d = not self.matrix.is_empty_cell(pd) d = not self.matrix.is_empty_cell(pd)
if (a and b) and (c or d): if a and b and (c or d):
if c: self.t_spin = "T-Spin"
pe = (pa + pc) / 2 elif c and d and (a or b):
elif d:
pe = (pb + pd) / 2
if not self.matrix.is_empty_cell(pe):
self.t_spin = "T-Spin"
elif (a or b) and (c and d):
self.t_spin = "Mini T-Spin" self.t_spin = "Mini T-Spin"
return rotated return rotated