3p5 a 11.1 Z02-I ran rind, EArl..,
• •••• •,.• •
ts” I I I. 1. / if
Task: Write a C program I 0 ploy ‘id Pore! omiunes, al van ation ofthe game Tetris, The gam e stalls with an empty playing field (a rectangOar vertical shaft called the “weir). A pentomino, which is an arrangement of fivo rounrct Otri .;(11M ro-; clio-;ou from a il’elort set of possible pantomimes, appears at the lop of the NA oil. p mi 7:1 I 00 it dme, (Ale square At A ti me. A pentomitno cannot fall into a square al rei:1 dY o caw ed by a previottdy falken pentom In°. When a. pentomino, can fall no futther. I ‘low pentorktino appears .10 the top of !Ile well and begins to fall. As pentominoes fat a solid boil% outal linc? witìiii,1 gps may torm. Viu such a line is formed, it disappears and any squares above it fail down one sqi Lire to iill the newly exit ptied. space.
The basic pentoininoes are:
13 1000011,1,,,,’,1■11,ii tit ill’ The possible pentominoes include the basic p entomino es, and their rotations in quarter turns, Essentially, each pentomino belongs to a family of betw een one and four distinct rotations . The N p1ThT1ftli1 lia s one rotation, and the M pantornino has four. As an example, the following are the four Ot i0111S of the M pentomino:
The ‘1’7′ • cse-hisensitiveusei inputisgiveiiintheforni of a to..:t file Eadi tine represents apentonuno• • • • • • .••-,•…•,.,••••••••_.,,,•••_.,_•._ iniithei. of quartei-turn clockwise rotations to ‘perform., and the column where the pentomino to appelt-.1: • •
at the top ‘of the well. The three fields are separated by w I lite spa ice, and the lines can be of different lengths. Only when a pentomino can’t fall any further, and solid lines are dealt witti, should the new pentomino appear at the top of the w ell. The program :must: ,acc -.1 cum /II Arld4 ine argument— —7. – ” ‘: ‘ ‘ ‘ . „.4%, – -A …„— • _ ….._ – —., —
t the Ilair)te of the in teuct e thrixigh ,
Alter all the p entomi noes- fall down tile well, th6 i ogr thould Print the eiitrørorit ofthewelito • • stailddr ti ur • • -61 , • . • • PlikO/F.i.r,e—s. • • —A1101.411 .4 1, • litito[119. 11- .r –
The well isi I 2x I 0 rectangle Eadi pentomino has a name, a letter of the alphabet. The number rot allow; is a noun egative initeger. When a piece is at the top of the well, itsieftmost square(s) must be on the COiL1uLnsprjied (an jut eger between Q and 9 inclusive), Land the bottom block(s) of the piece must be at the top of the well (i .e, immediately above the well).
A 15 le !LIM PC1 rpntomtnoes, c containing the ANT C semi-re coçJp Eefore slibmitting your solutions via Canvas, zip the ANSI C sokrcie c •name !he archive, if your name is Harry Houdini, for example, lyilouditu [• tta 1 I 111411, •
I 1 11 1,1 11 H 1, i .11 1 • i 1,11 1’, H