Tetris Matrix Math

So I developed a sort of working model for how Tetris blocks can be represented as a 3 dimensional array. I am using structures in a C program to keep track of them. Theoretically this could be used in a tetris clone but it’s important to get all the math right first so I have a function that can print text to the console to get an idea of what it would look like.

Here are screenshots of my source code so far that has code for the T,L, and S blocks.

And here are some screenshots of the output of the program when run.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s