Question: Can someone please write the java code that implements the TetrisDisplay class ( I have the others ) based off of these instructions. This class
Can someone please write the java code that implements the TetrisDisplay classI have the others based off of these instructions. This class creates the graphic display that shows the status of the game by extending a JPanel. The class has a constructor that take a TetrisGame object as a parameter.The only method that must be implemented is the the paintComponents method.paintComponent The method that will create all custom graphics for the JPanel subclass. For the full implementation, this will be responsible for creating the Well outline. the only image that must be drawn is the outline
of the wellthe well tetris bricks fall into It is recommended that each drawing task has its own method and as such the
task for drawing the well could be:
public void drawWell Graphics g
which is then called from the paintComponent method. This
is required. Can be done using three indvidual rectangles to draw the U shaped outline as shown to the right usingcellSize as the width of the outline. The height and width of each of the individual rectangle are calculated by using the number of rows or column as well as the cellSize.Rendering of the well should change to reflect a different number of rows and columns in the game as well as different cellSize in the display class. The finished product should be u shaped like this but connecting:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
