D. Final Algorithm, Flowchart, or Pseudocode

Group D

Matt Xu

Garrett Snyder

Norman Guo

Cole Helbig

______________________________________________________________________________________________________________________________________

Normtech Dice Game Pseudo Code:

This dice game will be one that tries to be a little more interactive than what is expected. It will be something that isn’t over in an instant but will also have quick replay value. The text in black is what was initially written, the blue is the writing that came after.

Fprintf(Try your hand against the legendary Normtech. If you can roll five die and total over 15, you win! Otherwise, you have lost your soul.

Each roll will happen as the player presses enter. The value will be shown to them, as well as the option to press enter again to roll the second time.

Fprintf- To roll dice one, press enter

N1=Rand [1,2,3,4,5,6]

Fprintf-you got  %i,N1

 

Fprintf- To roll dice two, press enter

N2=Rand [1,2,3,4,5,6]

Fprintf-you got  %i,N2

 

Fprintf- To roll dice three, press enter

N3=Rand [1,2,3,4,5,6]

Fprintf-you got  %i,N3

 

Fprintf- To roll dice four, press enter

N4=Rand [1,2,3,4,5,6]

Fprintf-you got  %i,N4

 

Fprintf- To roll dice five, press enter

N5=Rand [1,2,3,4,5,6]

Fprintf-you got  %i,N5

After the fifth roll, a vector of the values they rolled will be shown to them and their total. It will ask the player to press enter to see the results. A display will be shown of whether they won or not

Your_Roll_Summary=[N1,N2,N3,N4,N5]

Your_Dice_Value=N1+N2+N3+N4+N5

 

If N>15

Fprintf(You win! You will live to see another day)

Else

Fprintf(You lose! Normtech has taken your soul)

Post Production Notes:

There were a few minor edits made when it was actually coded and that is the winning point value. There were too many wins with 15 points and so it was changed to 18.

______________________________________________________________________________________________________________________________________

Card Game Flow Chart:

______________________________________________________________________________________________________________________________________

Battle Ship Flow Chart: