Your program cannot use file level variables or constants; your program cannot use global variables or constants. The functions that you write exchange data by means of return statements and value parameters and reference parameters only.
1. Change the pickUpSticks program so that the player who picks up the last sticks or sticks wins.
2. Write a parameterized function that plays the game. You must determine the function's parameters.
3. Write a Boolean function that has one string parameter and returns true if the user enters "Y", "YE" or "YES" and false otherwise. Use the trim and toupper functions to edit the user's input string. Use the function to determine whether the player plays the game. For example,
answer = readAnswer(prompt)
while answer is true
play game
answer = readAnswer(prompt)
end while
4. Write a void function that reads the game's parameters from a file. The function validates the parameters. If the parameters are "bad" the function assigns default values to the parameters. What is a "bad" parameter? If the maximum number of sticks the player can pick up is 3 and the initial number of sticks is 16 then the first player may lose. "16" is a bad parameter. We want the first player to win as long as the player makes no mistakes. The function returns the validated parameters.