Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Game of Tetris Program 1.6 Write a program to draw the interface of the Game of Tetris, as shown in Fig. 1.15. The game involves

Game of Tetris Program image text in transcribed

image text in transcribed

1.6 Write a program to draw the interface of the Game of Tetris, as shown in Fig. 1.15. The game involves playing with different shapes, each composed of four squares. The main area (large rectangle) should be sized as 10 x 20 squares (i.e. 10 squares wide and 20 squares high). The small rectangle on the right shows the "next shape" that will soon appear in the main area (a red "L" shape in the example). If you have not played Tetris before, you may find useful information on the Web (e.g. http://en.wikipedia.org/wiki/Tetris). Your tasks include Draw everything shown in this figure (the position of each component, e.g. rectangle, does not have to be exactly the same as in the figure). If the mouse cursor moves inside the main area, "PAUSE" (in a large font) will be displayed; and if the cursor moves out of the area, "PAUSE" will disappear D Dashed lines Fig. 1.14 Dashed lines elan1111@yahoo.com 28 I Elementary Concepts Next shape Main area Level: 1 Lines: 0 Score: 0 PAUSE QUIT Fig. 1.15 The Tetris interface Change of the window dimension will only possibly change the size, but not the relative position and aspect ratio of any component. If the button "QUIT" is pressed, the program terminates and quits (this should not be the quit from the window's standard pull-down menu). 1.6 Write a program to draw the interface of the Game of Tetris, as shown in Fig. 1.15. The game involves playing with different shapes, each composed of four squares. The main area (large rectangle) should be sized as 10 x 20 squares (i.e. 10 squares wide and 20 squares high). The small rectangle on the right shows the "next shape" that will soon appear in the main area (a red "L" shape in the example). If you have not played Tetris before, you may find useful information on the Web (e.g. http://en.wikipedia.org/wiki/Tetris). Your tasks include Draw everything shown in this figure (the position of each component, e.g. rectangle, does not have to be exactly the same as in the figure). If the mouse cursor moves inside the main area, "PAUSE" (in a large font) will be displayed; and if the cursor moves out of the area, "PAUSE" will disappear D Dashed lines Fig. 1.14 Dashed lines elan1111@yahoo.com 28 I Elementary Concepts Next shape Main area Level: 1 Lines: 0 Score: 0 PAUSE QUIT Fig. 1.15 The Tetris interface Change of the window dimension will only possibly change the size, but not the relative position and aspect ratio of any component. If the button "QUIT" is pressed, the program terminates and quits (this should not be the quit from the window's standard pull-down menu)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions