only part of a program...

/***********************************************************************

  • Name: Raymond Garcia
  • Date: January 24, 2010
  • Purpose: To play the math game Nim
  • Input: Users name, User moves, and preference as to whether or not
  • to play again
  • Output: Game info included remaining sticks, winner, & loser.
  • Game rules and prompts to continue playing or quit.
    • /
  1. include<iostream>
  2. include<iomanip>
  3. include<cctype>

using namespace std;

bool playGame(); void endGame(int, char *, char *); bool playerMove(int &, int &, bool &);

bool answer = true;

/**********************************************************************

  • Name: Main (int)
  • Purpose: To display the rules of the game and loop the game as long as
  • the users want to play
  • Pre-Condition: None
  • Post-Condition: The playGame function will be called. the program will
  • end if neccessary
    • /

int main() {

   int player;

   do
   {
      cout << '\n' << "Welcome to Nim Player!\n\n\n\n\n";
      cout << "Nim is played with two players and 13 sticks.\n\n";
      cout << "During each players turn he may take up to 4 sticks\n";
      cout << "Players take turns until no sticks are left\n";
      cout << "The player who takes the last stick is the loser\n\n\n";
      playGame();
   }while(answer == true);

//in the function endGame, the user will choose to play again changing //answer from true to false

return 0; }

/