资源描述:
《c++写的俄罗斯方块源代码+开发文档》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、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},□□□□□□□□□□□□□□□□□■■□□□□□□□■□□□□□□■□□■□□□□□■□■■■□□■□□■■■□□■■□□□■
2、□{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,
3、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,2
4、0,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#include#include#include#defineUP'w'#defineDOWN's'#defineLEFT'a'#defineRIGHT'd'#defineEsc27intkey=NULL;inta=0;structSh
5、ape{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},},{{
6、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
7、,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},{