Sunday 7 February 2016

Tesseract Day 4. It's a Ghost!

I can hardly call this a "Day", since it took me much less than I expected.

I added the ghost piece functionality. As you can see from the screenshot above, now you can see where the piece is going to fall if dropped. One more thing off the Tetris Guideline to do.

It took me less than 20 minutes, including some minor refactoring (starting to put some order in the chaos that is the main loop). Basically I had to add a small loop to compute the vertical position of the ghost piece every time the piece is moved. And now the renderer of the main board also adds the ghost squares every time it has to add a square for the current piece.

I like it.

A presto,

M.

No comments:

Post a Comment