我在libGDX框架中创建以下代码:
public class Play implements Screen {
private Stack<Integer>[][] intStack;
@Override
public void show() {
.....
// Initializations
intStack = new Stack[3][3];
for (int row = 0; row < btnSquares.length; row++) {
for (int col = 0; col < btnSquares[0].length; col++) {
// generate integer number randomlly
num = new Random().nextInt(9) + 1;
intStack[row][col] = new Stack<Integer>();
intStack[row][col].push(num);
.......
}
}
}
.........
}
在pop();
和push();
方法之后修改某些值..如何检查数组中所有堆栈中所有值是否相等?