shadvalley
disp('any key to continue')
pause


disp(['Welcome, ', name])


disp('Play the card game 10 times. You will be asked whether you want to raise (bet an additional $5)')
cardgame(10,1);
disp([name ', please press any key to try again.'])
pause
cardgame(10,1);
disp([name ', please press any key to continue'])
pause

disp([name ', press any key to play 100 games automatically. You will be asked to input a threshold number. '])
disp(['If you draw above or equal to this card, the program assumes you wish to raise. '])
pause
card=[' 2';' 3';' 4';' 5';' 6';' 7';' 8';' 9';'10';' J';' Q';' K';' A'];
disp('card number: card')
for i=1:13
disp([num2str(i),'           ' card(i,:)])
end
mybet=input( 'enter threshhold card number, (e.g.  for 10 enter card number 9, for K enter card number 12) ');
cardgame2(100,mybet,1);

mybet=input( 'To play another 10000 games, enter another threshhold card number ');
cardgame3(10000,mybet,bet(mybet));
mybet=input( 'Try again:  play another 10000 games, enter another threshhold card number ');
cardgame3(10000,mybet,bet(mybet));
mybet=input( 'Try again:  play another 10000 games, enter another threshhold card number ');
cardgame3(10000,mybet,bet(mybet));
mybet=input( 'Try again:  play another 10000 games, enter another threshhold card number ');
cardgame3(10000,mybet,bet(mybet));
disp('Questions')
disp('1. Did you lose money or win money overall?')
disp('2. How is your betting strategy changing? ')
disp('3. Can you determine how the computer betting strategy changes as you change yours?')
disp('4.  Is there a best or optimal strategy?')

