Created
January 31, 2011 20:50
-
-
Save jarodl/804782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function: getCopyAndMakeNextMove | |
// | |
// Desc: Creates a copy of the current object then performs the makeNextMove | |
// function on it, advancing it to its next state. | |
// | |
// Pre: None. | |
// | |
// Post: A new object is returned and the next move is taken from the stack. | |
Board getCopyAndMakeNextMove() | |
{ | |
Board nextState = Board(*this); | |
nextState.makeNextMove(); | |
moves.pop(); | |
return nextState; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment