1

I have a 7x5 matrix with several bitmask values, each corresponding to a particular Tetris piece uniquely colored and positioned over the 7x5 array. I need to get the position shape & name(1 out of 19 basic named Tetris shapes) of the Tetris piece based on the selected bitmask value (see sample image below). I can easily draw blocks over a 7x5 matrix by mapping the 1's and 0's to get the shape and position, but I'm running short of thoughts to get the name of the piece.

I need to do this in C# and I'm pretty much clueless with a possible solution so far. Any help would be greatly appreciated. Thanks in advance.

enter image description here

Arvind_R
  • 59
  • 6

0 Answers0