Tetris problem

the map of Tetris is implemented in a two-dimensional array, and squares are also implemented in arrays, but I just don"t understand how maps interact with squares.

is how to know where the square is on the map. Besides, although the two-dimensional array can be understood as a naughn table, it is not. I don"t know what it is.

ask the great god to say

Mar.03,2021

you can define the map as a two-dimensional array. If each grid has a square, it is defined as 1, otherwise it is defined as 0.
when each square moves in it, judge whether the grid occupied by the next position has a square, that is, whether there is one, and then you can't move to the next position, otherwise you can move


is not an array, but a two-dimensional coordinate system, but this coordinate system can be represented by a two-dimensional array.
the transformation of squares, that is, the transformation of coordinates

  • Ask everyone to help write a rule?

    the original rule is as follows [1-9] {1} [0-9] {3} now I want to rule out the result of 2035. How do I write it? because I m in a hurry, I can t think for myself. Regularity is my weakness. Thank you! ...

    Mar.05,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2eb8e-2bc43.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2eb8e-2bc43.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?