I've corrected the code a little bit.
But overall, well done.
Enjoy playing Tetris!
P.S. Just don't forget to adjust the height of the console.
Requirements:
• Your big task for Level 32 is done!
Justin SmithLevel 41, Greenfield, USA, United States
26 September 2022
This whole big task is far easier than any of regular tasks. Parts 1 through 11 should have been all one long (but still easy) task, the orange ones are easy, and the only red task is probably equal to a regular orange task. Overall, all of the real work is provided for you. Which means you don't really learn much doing this task, but I guess it's a nice break.
My suggestion for the CG team to make this one a lot better:
1. Use a graphical JFrame implementation, not the wonky console one. This is the perfect opportunity to introduce working with graphics.
2. Actually have people write the code for setting up JFrames and stuff. I get that it hasn't been taught, but you could still have easy-rated tasks where you literally just tell students what to type, and it would be more educational than this.
When they ask you to create methods, I thought they also had to be implemented unless explicitly specified not to. But now that I get to the next assignments, my existing implementation of these methods got overridden and I had to redo the implementation from scratch. print, removelines etc.
So for whoever reads this in time, don't work on things they aren't explicitly telling you to in the making of Tetris.
Pretty easy task but not structured well. I found the games in the game section had better structure and allowed you to do more. Here a lot of the code is written for you.
It's not difficult to apply 2048 tactics to extend this task. Instead of displaying characters in console, Modify the JPanel in View class of 2048, different colors of GamePieces can be shown like the diagram shown above. Just replace the "1" of gamePieces with various int index which represents different colors. Of course, it needs some modifications on various classes logic. But it's worth to spend several hours to make it a real playable game. Have fun!
GO TO FULL VERSION