Closed jamespeilunli closed 3 years ago
We can do this by calling collision_detect
twice.
Actually, we don’t have to directly call collision_detect twice. We can just have 2 dead variables, soft_dead and hard_dead, where some logic sets soft_dead to true first, then hard_dead if collision still happens. If not, they get reset to false.
Sorry for no md formatting, I couldn’t find the back tick symbol on my mobile device I’m using to write this comment.
See the orange tetromino; it's floating. This is because right when the orange tetromino fell on the purple tetromino, the collision detect gave the orange tetromino a last chance to move out of the way, which it did. But, the collision detect set the orange tetromino to "dead" anyways.