0204060□□□□20□□□□40□□□□60□□□□每一点取的是左上角坐标□□□□□□□□□□□□□□□□□■□□□□□□□■■□□□□□□■□□□□■□□□■□■■■□□■■□■■■□□□■□■□□□{20,60,20,40,20,20,40,60,RED,1},{0,60,20,60,40,40,40,60,RED,2},{20,20,40,20,40,40,40,60,RED,3},{0,60,0,40,20,40,40,40,RED,0},□□□□□□□□□□□□□□□□□■■□□□□□□□■□□□□□□■□□■□□□□□■□■■■□□■□□■■■□□■■□□□■□{20,60,20,40,20,20,40,20,YELLOW,1},{0,40,0,60,20,60,40,60,YELLOW,2},{20,60,40,60,40,40,40,20,YELLOW,3},{0,40,20,40,40,40,40,60,YELLOW,0},□□□□□□□□□□□□□□□□□□□□□■□□□□□□□■□□□■□□■■□□■■■□□■■□■■■□□■□□□■□□□■□□{0,60,20,60,20,40,40,60,GREEN,1},{0,40,20,60,20,40,20,20,GREEN,2},{0,40,20,40,20,60,40,40,GREEN,3},{20,20,20,40,20,60,40,40,GREEN,0},□□□□□□□□□□□□■□□□□■■□■■□□■■□□□■□□{0,60,20,60,20,40,40,40,WHITE,1},{0,40,0,20,20,40,20,60,WHITE,0},□□□□□□□□□□□□□■□□■■□□■■□□□■■□■□□□{20,0,20,20,20,40,20,60,LIGHTGRAY,1},{0,40,20,40,40,40,60,40,LIGHTGRAY,0},□■□□□□□□□■□□□□□□□■□□■■■■□■□□□□□□{20,20,20,40,20,60,20,80,LIGHTGRAY,1},{0,60,20,60,40,60,60,60,LIGHTGRAY,0},□□□□□□□□□■■□□■■□{20,40,20,60,40,40,40,60,LIGHTGREEN,1}以下是源代码:Game.h文件#include<graphics.h>#include<conio.h>#include<cmath>#include<time.h>#defineUP'w'#defineDOWN's'#defineLEFT'a'#defineRIGHT'd'#defineEsc27intkey=NULL;inta=0;structShape{intxy[8];intcolor;};structfull//记?录?每?个?方¤?块¨¦的Ì?信?息¡é{boolisfull;intcolor;};Shapeshape[7][4]=//7种?基¨´本À?形?状Á¡ä四?种?变À?形?(ꡧ不?够?四?种?变À?化¡¥的Ì?用®?相¨¤同ª?的Ì?来¤¡ä填¬?充?)ê?{{{20,60,20,40,20,20,40,60,RED},{0,60,20,60,40,40,40,60,RED},{20,20,40,20,40,40,40,60,RED},{0,60,0,40,20,40,40,40,RED},},{{20,60,20,40,20,20,40,20,YELLOW},{0,40,0,60,20,60,40,60,YELLOW},{20,60,40,60,40,40,40,20,YELLOW},{0,40,20,40,40,40,40,60,YELLOW},},{{0,60,20,60,20,40,40,60,GREEN},{0,40,20,60,20,40,20,20,GREEN},{0,40,20,40,20,60,40,40,GREEN},{20,20,20,40,20,60,40,40,GREEN},},{{0,60,20,60,20,40,40,40,WHITE},{0,40,0,20,20,40,20,60,WHITE},{0,60,20,60,20,40,40,40,WHITE},{0,40,0,20,20,40,20,60,WHITE}},{{0,40,20,40,20,60,40,60,BLUE},{0,40,0,60,20,40,20,20,BLUE},{0,40,20,40,20,60,40,60,BLUE},{0,40,0,60,20,40,20,20,BLUE},},{{20,0,20,20,20,40,20,60,LIGHTGRAY},{0,40,20,40,40,40,60,40,LIGHTGRAY},{20,0,20,20,20,40,20,60,LIGHTGRAY},{0,40,20,40,40,40,60,40,LIGHTGRAY},},{{20,40,20,60,40,40,40,60,LIGHTGREEN},{20,40,20,60,40,40,40,60,LIGHTGREEN},{20,40,20,60,40,40,40,60,LIGHTGREEN},{20,40,20,60,40,40,40,60,LIGHTGREEN},}};classGame{intx,y;//xy表À¨ª示º?方¤?块¨¦的Ì?相¨¤对?坐Á?标À¨ºintdir;//方¤?块¨¦移°?动¡¥方¤?向¨°int_shape;//七?种?形?状Á¡äintchange_shape;//四?种?变À?换?intold_shape;//记?录?未¡ä变À?形?方¤?块¨¦的Ì?形?状Á¡äintold_change_shape;boolis_fullline[20];//标À¨º记?是º?否¤?满¨²行Dfullisfull[20][10];//标À¨º记?是º?否¤?有®D方¤?块¨¦20行D10列¢Dpublic:Game();intshapeX(inti){return(shape[_shape][change_shape].xy[i]+x);};//返¤¦Ì回?shape形?状Á¡ä第̨²i个?方¤?块¨¦的Ì?的Ì?实º¦Ì际¨ºX坐Á?标À¨ºintshapeY(inti){return(shape[_shape][change_shape].xy[i+1]+y);};//返¤¦Ì回?shape形?状Á¡ä第̨²i个?方¤?块¨¦的Ì?的...