need help building a script simulating blackjack
이전 댓글 표시
Build a script that, when run, will produce two cards from a deck of 52 and will output the face and suit of each card as well as the sum of the face value of the two cards. (Assume 2 – 9 carry their own value, 10 – K carry a value of 10, and A is 11.) If the user’s sum is 21, say, “Jackpot!” If it is 15 or less, say, “Hit!” If neither, say, “Stay!” Hint: You need three variables per card: suit string (spade, heart, diamond, or club), face string to be printed out, and face value that can be put into the sum. Use the GRADS method to break this problem down!
답변 (1개)
Image Analyst
2018년 2월 16일
0 개 추천
For what it's worth, you might get some hints on your homework if you study my attached scripts on Monte Carlo card dealing.
I don't know what the GRADS method is that you're supposed to use.
카테고리
도움말 센터 및 File Exchange에서 Card games에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!