<font color=blue size=4><b><pre>

//BATNUM  --  BATtle of NUMbers   Ʀrj

 int nStone, maxTake;  // `Y, ̦hiX?
   boolean lastToWin = true; // ̫@Ĺ٬O?
int main( ) {
   //BATtle of NUMbers
   hello( ); // welcome message
   playAgain = true;
   while(playAgain) {
      prepareGame( );
      userFirst = askUserFirst( );
      playGame( );
      playAgain = askPlayAgain( );
   }
   print("Bye bye\n"); return 0;
} // main
======================
void hello( ) {
   // welcome message and/or game rules
}
void prepareGame( ) {
    // ζü ͥX CһݪU Global variables
    //nStone = ζüƨo 15 .. 31;
    //maxTake = ζüƨo 3..7 ;
    //ζüƨMw lastToWin O true ٬O false

}
boolean askUserFirst( ) {
   // Y USER n, NǦ^ 1 
   return (38==38);  // YES / TRUE
}
boolean askPlayAgain( ) {
   // user ŪJ, Y USER n~, NǦ^ true 
   return false;  // NO / FALSE ܤF :-) 
}
void userTurn( ) {
   // nTake =  USER nX;
   // ˬd nTake O_XGWw? YŦXhnD user sJ 
   // MMnq nStone h nTake
}
void computerTurn( ) {
  // gHKnXGWw, NO 1..min(maxTake, nStone) ü 
  // AQXiĹN|Ĺ (² :-)
  // Hint:  max(1, (nStone - xxx) % (1+maxTake) ) N|Ĺ
  //    䤤 xxx O  0  if lastToWin is true
  ///        xxx O  1  if lastToWin == false
}
void playGame( ) {
  // user and the computer take Turn until no more stones left
  // if(userFirst) userTurn( );
  // Loop until no more stone
  //   computerTurn( ); 
  //   if no more stone then leave the Loop;
  //   userTurn( );
  // end Loop
  // Judge the game result and print some message..
  // pP_ֿĹ? D̫֮@! 
  // `N̫@ӬO٬OĹ? 
  //   (lastToWin == true ܮ̫@ӪĹ )
} // playGame
