I trying to make a Matlab code with my favorite game. Help me.

2 次查看(过去 30 天)
I want to a make matlab code with this game. It on the youtube link. I work on it but I'm stop at some problems.
clc
clear all
%My_card_deck_1
card_shuffled= randperm(10);
My_card_1= card_shuffled(1);
A= My_card_1;
%My_card_deck_2
B= "My_secret_card";
%My_hand_card
[A B]
This is what I did. Help me to finish the code.
  3 个评论
gogogo
gogogo 2022-5-30
So the game is to play with 2 card deck. Frist you pick one card of each of your card deck. Also the opponent do it as the same. One is that you can see and the other one is that can not see untill the you and your opponent opened the card. If the sum of the 2 cards is bigger than the opponent you win the game.
I want the matlab code for the opening the card. That I want to. And how to end the game.
Walter Roberson
Walter Roberson 2022-5-30
cards = randperm(52,2)
value = mod(cards-1,13)+1
First 13 are one suit, next are another, and so on

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Card games 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by