Say you have a simple tetris "game". Each piece have 1 single colour, and you read moves as: *Type *Rotation *Column of the first left piece's square inside matrix.

Pieces fall till the end or untill they colide with another piece on the given column. For simplification, we agree that no side movement is implied.

Now let say we want to generate an input file from a completed matrix, so we can recreeate the whole map as:

N, which represent the number of pieces

Each piece: Type, Rotation, Column

*they fall in the order they appear first.

Type of pieces: Square, L J Z S I T with rotations

Any solutions?simple example, 5 and 7 are matrix dimension in squares

New contributor
Hubert Mark is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as off-topic by Luis felipe De jesus Munoz, fəˈnɛtɪk, AdmBorkBork, lirtosiast, Skidsdev Jan 11 at 19:26

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions without an objective primary winning criterion are off-topic, as they make it impossible to indisputably decide which entry should win." – lirtosiast, Skidsdev
  • "This site is for programming contests and challenges. General programming questions are off-topic here. You may be able to get help on Stack Overflow." – Luis felipe De jesus Munoz, fəˈnɛtɪk, AdmBorkBork
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Questions on this site needan objective winning criterion to be on-topic, the mosy cpmmon of which is code-golf. You should also clear up the input/output format. Are we taking an image or a 2D array? How do output the list of pieces? \$\endgroup\$ – Jo King Jan 11 at 22:41