F. Discussion

Roulette-

When testing the code it worked perfectly. First it would ask what type of bet, then asks you to make the bet, and finally states the number rolled and if you won or lost. For example if the person wanted to bet even or odd they would enter 1. If they wanted odd they would enter 1 again. If 17 was rolled it would print that they won.

The progression of the code was pretty simple. The code was repetitive once we figured out the proper way to write it. Once we got the correct order of the and/or statements it was smooth sailing

The one struggle we had was some of the variables not having values. Once talking to some other people we figured out that the variables had to be set to 0 first.

Hangman

Coding hangman was very challenging. We had to generate variables and functions to allow the text file “enigmix.txt” to be read. Make variables for the word, the number of turns the player will have and when to “hangman when the player is out guesses.

During testing, it was realized that the character(_) we were using to display the length of the word for the player to guess the word was difficult to tell how many words were left to guess.  The Character was switched to (*) which was visible for the player to tell instead of just focusing on the code telling the player how many turns we left for the player to guess the word.

the most challenging part of this code was to find the right way to show the player the number of words he has guessed and how many more was left to guess

Under or over 7

When we worked on this code, we were sure about how to start off and how the code would end when we were discussing it. We asked the user to enter the amount that they have to bet, and after that they will input how much money they want to bet. If they do not have enough money to bet, they were asked to bet with smaller amount.

The code worked well for us, we found out better ways to do the coding and using proper techniques for fprintf and if-else statements. If-else statements were the best way to go for this game.

One of the struggles for this game was that every time we run it, it made issues with our ‘Payout’ variable and would not give right values. After talking to TA’s and within the group, we were able to resolve it and it gave us the right value in the end.

Craps

During game testing, it was found out that the code was not giving the numbers which are not the desired out comes (7,11, 2,3) to the player as the point and for the game to continue rolling.  This was also the most challenging part of the code . the while loop was established to help us to use the winning point aspect of craps

Another challenge was using and (&&)  or or  ( ||) statements to establish the conditions for the bets. The code was switched for if -else statement to case-switch.