0
How to rotate a block in python without getting through in grid and the other blocks in tetris
The block doesn't rotating and also the block keeps on getting through in other blocks
2 Respostas
+ 2
You can implement collision detection algorithms Mentor sir Ausgrindtube already mentioned.
This Algorithm can check for overlaps with existing blocks after each rotation operation. If a collision is detected, prevent the rotation from occurring or adjust the block's position accordingly to avoid trespassing onto other blocks.
+ 1
You would have to program them to "collide" or know of the space of the other blocks etc.