Author | Message |
---|---|
chuckh
Posts: 12
|
Posted 08:47 May 06, 2016 |
Maybe I am overlooking where the copy constructor is but can someone let me know where that is? The instructions say to use the copy constructor provided to make a copy of the current board and save in the arraylist"
"
" |
rpuas
Posts: 29
|
Posted 22:32 May 06, 2016 |
Use this constructor... it returns a new PuzzleBoard with a copy of the tiles ArrayList PuzzleBoard(PuzzleBoard otherBoard) { tiles = (ArrayList<PuzzleTile>) otherBoard.tiles.clone(); } |