Thread: clone problem
View Single Post
  #2 (permalink)  
Old 01-06-2008, 12:14 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Cloning
Hello feniger

The problem could be in any of the clone() methods that you defined. For example:
Code:
futureBoard.theBoard = board.theBoard.clone();
Remember that when you clone an object, you must create new instances of every data type in your object. I created a chess game before and faced the same problem. I used cloning successfully, but I realized later, that if you implement AI then the game becomes painfully slow. (like two minutes between moves) I can help you with your game, but for me, cloning the whole chessboard was not a suitable solution.
__________________
If your ship has not come in yet then build a lighthouse.
Reply With Quote