Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Next shape Main area Fig. 5.31 Tetris: seven shapes .12 Enhance your adapted Tetris program (from Exercise 1.6 in Chap. 1) to include the following
Next shape Main area Fig. 5.31 Tetris: seven shapes .12 Enhance your adapted Tetris program (from Exercise 1.6 in Chap. 1) to include the following steps and functionality Randomly select one of the seven shapes, as shown in Fig. 5.31, to be displayed in the center at the top of "Main area" and randomly select a different shape to be displayed in "Next shape". The starting orientation of the shape can be fixed. tfelan1111@yahoo.com 1189 The shape at the top of Main area" moves down (falls) at a constant speed. Once the shape's lowest edge or point touches the bottom of "Main area" or the top edge or a point of another shape, it stops moving and stays there. When the cursor is outside of "Main area", each click on the left mouse button moves the falling shape to the left by one square, and similarly, the right button moves the shape to the right by one square. A forward scroll of the mouse wheel will rotate the shape clockwise and a backward scroll will rotate the shape counter-clockwise, both through 90. If the mouse cursor moves inside "Main area", the falling stops, i.e. a pause
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started