Editorial for COCI '17 Contest 1 #2 Tetris


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

The most complex part of this task is to translate the images of Tetris figures into the program code with all of their possible rotations, so we can recognize them in a matrix. One possibility is to store one position of each figure and then programmatically generate the rotations and compared them to the content from the matrix. Another possibility is to manually write if-statements for each rotation. The first approach requires more programming skills, and the second requires more careful code-writing.

When we decide on the strategy to recognize the figures, we are left with counting the number of appearances of each one.


Comments

There are no comments at the moment.