Posts Tagged ‘T-spin’

Tetris Aside: Coding for T-Spins

October 13, 2012 3 comments

(the source code and EXE file for this update of SimpleTetris can be found at the end of the article)

One of my Tetris-playing colleagues pointed out to me recently that T-spins do not work in my implementation of SimpleTetris. Although I hadn’t checked it explicitly, I was quite surprised by this as I knew the code I had written should support them just fine.

A nice double t-spin opener.

The orange-coloured T-piece here will fall 2 more rows, at which point it can be rotated such that it will complete the bottom 2 rows. This ‘impossible’ rotation of T-pieces where in real life the piece would be locked into place is the premise of the T-spin.

For those not in the know, the Tetris Wikia T-spin page has some excellent explanations and diagrams of what T-spins are; namely, when you rotate a T-shaped Tetris piece in a way that would be impossible in real life (due to the corners being obstructed by other blocks) such that it fits snugly into a T or notch-shaped hole (see image).

Read more…

%d bloggers like this: