由于这部分代码,我的Aap崩溃了,但编译时未显示任何错误。
GridLayout playAgainGrid = findViewById(R.id.gridLayout);
for (int i = 0; i < playAgainGrid.getChildCount(); i++) {
ImageView counter = (ImageView) playAgainGrid.getChildAt(i);
counter.setImageDrawable(null);
}
for (int i = 0; i < gameState.length; i++) {
gameState[i] = 2;
}
activePlayer = 0;
gameActive = true;