CS241: Implementing a game tree

  1. clone() and myClone()
    1. Shallow copy
    2. Deep copy
    3. Should you always write clone() or myClone() when you write a class (like constructors, accessors, toString, and possibly equals)?
  2. Design for gameOver()
                if no legal moves
                    return true;
                if (xWins or oWins)
                    return true;
                return false;
    
                xWins()
                    return rowWin or colWin or diagWin
                
                might you want to write a clever win method that those 4 would call?
                                
  3. lab
  4. Move and MoveList?
  5. String and StringList?