struct board
{int var;
in color;
}gameboard[20][12];
struct block
{ int a[4][4]
int color;
}box[]={
{2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2},
{3,3,3,0,3,0,0,0,0,0,0,0,0,0,0,0,3},
{3,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,3},
{0,0,3,0,3,3,3,0,0,0,0,0,0,0,0,0,3},
{3,0,0,0,3,0,0,0,3,3,0,0,0,0,0,0,3},
{4,4,4,0,0,0,4,0,0,0,0,0,0,0,0,0,4},
{0,4,0,0,0,4,0,0,4,4,0,0,0,0,0,0,4},
{4,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0,4},
{4,4,0,0,4,0,0,0,4,0,0,0,0,0,0,0,4},
{5,5,5,0,0,5,0,0,0,0,0,0,0,0,0,0,5},
{0,5,0,0,5,5,0,0,0,5,0,0,0,0,0,0,5},
{0,5,0,0,5,5,5,0,0,0,0,0,0,0,0,0,5},
{5,0,0,0,5,5,0,0,5,0,0,0,0,0,0,0,5},
{6,6,0,0,0,6,6,0,0,0,0,0,0,0,0,0,6},
{0,6,0,0,6,6,0,0,6,0,0,0,0,0,0,0,6},
{0,7,7,0,7,7,0,0,0,0,0,0,0,0,0,0,7},
{7,0,0,0,7,7,0,0,0,7,0,0,0,0,0,0,7},
{8,8,0,0,8,8,0,0,0,0,0,0,0,0,0,0,10}
};
这里变形的可以这样搞
upshow(int n)
int m;
switch(n)
{case 0:m=1;break;
case 1:m=2;break;
case 2:m=3;break;
……}
return m;
}
这里还应该搞个检查是否可以放的容器;加上去
一起做???