Answered You can hire a professional tutor to get the answer.
QUESTION
When the current shape stops at the bottom, the next shape starts to drop. In themain()function, before the while loop (game loop), you will create two Tetris objects at the same time:currentTetrisShape, andnextTetrisShape. Inside the game loop, when the current shape is stuck, you check whether a line is complete. Then, you callcurrentTetrisShape.setShape(nextTetrisShapeType). In thesetShape()function, you assign the properties of the shape:shapeType, top left X and Y,shapeArray, etc. Then you callnextTetrisShape.setShape(use a new randomly generated int).
Show more