synchronized void drop(Board board) {
int[][] a = getArray();
int[][] b = board.getArray();
//I don't have currentObject here... what do I need to write?
if (Board.goDown(currentX, currentY, b, a, board, currentObject)) {
currentY++;
updateXY();
}
}
方法调用为currentObject.drop(board)
,但我们无法将currentObject
作为变量传递。
有没有简单的方法可以做到这一点,或者我只需要重写整个代码?