Counting A Byte As An Int?
publicclass TetrisGrid{
privatebyte[][] gridData =newbyte[10][20];
publicvoid initializeBlack(){
for (int x = 0; x < 10; x++){
for (int y = 0; y < 20; y++){
updateIndex(x, y, 0);
}
}
}
publicvoid updateIndex(int x,int y,byte data){
gridData[x][y] = data;
}
public Boolean bottomRowFull(){
for (int x = 0; x < 10; x++){
if (gridData[x][0] == 0){
returnfalse;
}
}
returntrue;
}
publicvoid clearBottomRow(){
for (int x = 0; x < 10; x++){
gridData[x][0] = 0;
}
}
publicvoid updateAfterClear(){
for (int x = 0; x < 10; x++){
for (int y = 1; y < 20; y++){
gridData[x - 1][y - 1] = gridData[x][y];
}
}
}
publicvoid betaShow(){
for (int x = 0; x < 10; x++){
for (int y = 0; y < 20; y++){
if (x == 9){
System.out.println(gridData[9][y] +"\n");
}
else
{
System.out.println(gridData[x][y]);
}
}
}
}
}
Won't compile...
"updateIndex(int, int, byte) cannot be applied to (int, int, int)"
But I am using a byte. o.O
(refering to 0)

