俄罗斯方块java
j=0;j<diamondsTable[i].length;j++)
if(j==diamondsTable[i].length-1)
diamondsTable[i][j]=0;
else
diamondsTable[i][j]=j+1;
}
public void setAryDiamonds()
{
switch(iSortNo)
{
case 0:
switch(iStatusNo)
{
case 0:
iHeightGrid=4;
iWidthGrid=1;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
aryDiamonds[i][j]=1; //对于方块0的状态0,4*1矩阵中的每一个元素都是显示部分.
break;
case 1:
iHeightGrid=1;
iWidthGrid=4;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
aryDiamonds[i][j]=1;
break;
}
break;
case 1:
switch(iStatusNo)
{
case 0:
iHeightGrid=3;
iWidthGrid=2;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==1)&&(j==1))||((i==2)&&(j==1)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
case 1:
iHeightGrid=2;
iWidthGrid=3;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==0)&&(j==1))||((i==0)&&(j==2)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
case 2:
iHeightGrid=3;
iWidthGrid=2;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==0)&&(j==0))||((i==1)&&(j==0)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
case 3:
iHeightGrid=2;
iWidthGrid=3;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==1)&&(j==0))||((i==1)&&(j==1)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
}
break;
case 2:
switch(iStatusNo)
{
case 0:
iHeightGrid=3;
iWidthGrid=2;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==1)&&(j==0))||((i==2)&&(j==0)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
case 1:
iHeightGrid=2;
iWidthGrid=3;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iWidthGrid;j++)
if(((i==1)&&(j==1))||((i==1)&&(j==2)))
aryDiamonds[i][j]=0;
else
aryDiamonds[i][j]=1;
break;
case 2:
iHeigh
tGrid=3;
iWidthGrid=2;
aryDiamonds=new int[iHeightGrid][iWidthGrid];
for(int i=0;i<iHeightGrid;i++)
for(int j=0;j<iW
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库俄罗斯方块java(5)在线全文阅读。
相关推荐: