D. Final Algorithm, Flowchart, or Pseudocode

The text adventure will follow a basic structure of fprintf statements followed by if statements when a decision is encountered

fprintf storytelling

fprintf storytelling

fprintf storytelling

prompt =

input = input(prompt)

if 1

take them to this decision

elseif 2

take them to this decision

else

make them repeat the input prompt

fprintf storytelling

fprintf storytelling

fprintf storytelling

fprintf storytelling

prompt2 =

input2 = input(prompt2)

if 1

take them to this decision

elseif 2

take them to this decision

else

make them repeat the input prompt

fprintf storytelling

etc

The blackjack game will follow this code outline for the game

clc
clear
%Label Card values that are not numeriacal values
king = 10;

%Must add chips that will be retained during the game
chips = 100;
%outside while loop^

%Creation of deck
hearts =
spades =
diamods =
clubs =
deck =
%shuffle the deck
randperm
shuffle(deck)
%Will add a while loop so multiple games can be played
while1

%Have an fprintf that will show the card values for the player
%deal cards without asking if you want more
playerHand =
%creation of player hand
%Create for statements to change the ace
%while loop for card hit
while2
%while loop for dealer/smart AI
while3

%Must have all potenital outcomes with if and elseif statements
if
elseif
elseif
elseif…

%ask to play again
x = input(”)