A
aDeamon
When I do this
char[][] board;
// here I have some code placing data into board
// later I do this in another method that takes the former board as a
input
char[][] tmpBoard = board;
for(Point p : HashSet<Point>) {
tmpBoard[p.x][p.y] = EMPTY;
}
For some reson both board AND tmpBoard has been changed and looks the
same. I would expect only tmpBoard to have changed - am I wrong?
/Sam
char[][] board;
// here I have some code placing data into board
// later I do this in another method that takes the former board as a
input
char[][] tmpBoard = board;
for(Point p : HashSet<Point>) {
tmpBoard[p.x][p.y] = EMPTY;
}
For some reson both board AND tmpBoard has been changed and looks the
same. I would expect only tmpBoard to have changed - am I wrong?
/Sam