mirror of
https://github.com/LDDestroier/CC/
synced 2025-02-09 07:30:02 +00:00
Added T-Spin Triple rotation (no detection, yet)
This commit is contained in:
parent
a5e0d08f72
commit
9497203bf2
@ -283,6 +283,12 @@ local makeNewMino = function(minoType, board, x, y, replaceColor)
|
|||||||
mino.shape = output
|
mino.shape = output
|
||||||
-- try to kick off wall/floor
|
-- try to kick off wall/floor
|
||||||
if mino.checkCollision(0, 0) then
|
if mino.checkCollision(0, 0) then
|
||||||
|
-- try T-spin triple rotation
|
||||||
|
if not mino.checkCollision(-direction, 2) then
|
||||||
|
mino.y = mino.y + 2
|
||||||
|
mino.x = mino.x - direction
|
||||||
|
return true
|
||||||
|
end
|
||||||
-- kick off floor
|
-- kick off floor
|
||||||
for y = 1, math.floor(#mino.shape) do
|
for y = 1, math.floor(#mino.shape) do
|
||||||
if not mino.checkCollision(0, -y) then
|
if not mino.checkCollision(0, -y) then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user