B. User Manual

Blackjack:

Blackjack is a card game that uses an entire deck of cards. It involves a player and a dealer and is conventionally a means to gamble. The objective for the player playing the game is to get a higher card total than the dealer while not crossing to total of 21.

Each card has a specific value depending on the face value of the card dealt (the suit of the card does not matter).

Ace = 1 or 11, 2-10 have the same value as the face value of the cards, and all face cards like Jacks, Queens and Kings are valued at 10.

The game begins with the dealer dealing four cards: two to himself and two the player. Of the four cards initially dealt, one of the dealers card is dealt face down. This card will remain hidden until the player is satisfied with their total.

Once the player is dealt two cards, he/she has the option to “hit” if they are not satisfied with the total. If the player chooses to hit, the dealer deals him one more card and then the players new total is the combined total of all the three cards. The player is allowed to hit as many times while his total is below 21 until the player is satisfied with his total. 21 is the highest total possible in the game. If the players total surpasses 21, they bust and lose their bet.

Once the player is satisfied with their total the dealer uncovers the initially hidden card. After which the dealer has to hit if his/her total is 16 or below. the dealer will not hit once his/her total goes above 17. If the dealers total goes above 21 the dealer is considered bust and the player wins assuming the player remained under 21.

When the dealer wins, the player loses their bet. When the player wins, they earn double the amount of his initial bet.

When both the dealers and players totals are below 21 the one with the higher total wins.

When both the player and the dealer have the same total the game is considered a tie/push and the player only takes his bet back.

In the case when an Ace is dealt, the Ace can be used as a 1 or an 11, depending on which of the two leads to a higher total while the total still being 21 or lesser.

After these rules are comprehended, playing our version of the game is quite easy.

You are first asked to enter the dollar amount of the amount of money you would like to bring to the table.

Then you are asked to type in the amount which would be your bet for the round.

After you have placed your bet, one of the dealers card along with two of your cards and your total will be displayed.

You are then asked whether you would like to hit? You can type in yes or no depending on whether you would like to hit or not. This step is repeated until you’re satisfied with your total.

Once you are satisfied with your total, the dealers total is revealed and you are told whether you win, tie, or lose.

In either case your win, loss, or tie amount is calculated and your bankroll is automatically updated.

Happy Gambling and Good Luck.

 

 

Mastermind:

Mastermind is a simple, color based logical deduction game based on figuring out a code that is randomly generated.

  • The code consists of four colors, which are randomly generated
  • There are no duplicate colors in the code
  • The code stays constant
  • The code has a specific order
  • The code consistent of 4 of 6 colors; red, orange, yellow, green, blue, and purple

To begin play, start the game, then the code is generated, and you begin your turn, which is the guess phase.

Guess phase: the user is prompted to enter 4 colors, one at a time, once again from the options of red, orange, yellow, green, blue and purple. Keep in mind, the order they are entered does matter, and is required to match exactly with the code in order to win. After a full guess is entered, your turn is over, and you enter the feedback phase.

Feedback phase: Based on your guess, you will receive any amount of two different pegs, or no pegs at all, depending on how correct your guess was. Keep in mind, the order in which the pegs appear to the user has no bearing on which colors are correct or not in a certain slot, just that the is 1 to 1 ratio for each peg. Black pegs mean that a color in your guess was the same color as the one in the code, and is in the same position, meaning a fully correct guess. White pegs mean that a color in your guess was the same color as one in the code, just in the wrong position. Lastly, blank pegs, meaning no feedback, meant that the color(s) in your guess were the wrong color, and in the wrong position. Keep in mind that each peg corresponds to one color in the answer, meaning that when guessing a duplicate color, one can trigger a black peg, while the other can trigger no peg.

Playing the game: The game starts with your guess, and alternates between the two phases for 10 full cycles, or until the code is perfectly guessed, which ever happens first.  The game is over once either of these events occur, and you win if you get it right. Happy playing, and good luck!!