private int crash(int x, int y, int blockType, int turnState) {
for (int a = 0; a < 4; a++) {
for (int b = 0; b < 4; b++) {
if ((shapes[blockType][turnState][a * 4 + b] &&map[x + b
+ 1][y + a]) == 1) {
return 0;
}
}
}
return 1;
}
////主要是这段if语句的判断搞不懂
if ((shapes[blockType][turnState][a * 4 + b] &&map[x + b
+ 1][y + a]) == 1)
//为什么a要乘以4加b?