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
作为变量传入。
有什么简单的方法可以做到这一点,还是我只需要重写整个代码?