help !! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

help !!

So i made a poker game and now i dont know how to compare hands to specify wich one wins :(any help)? https://code.sololearn.com/c9KOD4e3PTmo/?ref=app

9th Aug 2018, 11:38 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
9 Answers
+ 1
you would have to have something like an array to store both hands and then compare them that way
10th Aug 2018, 7:00 AM
hinanawi
hinanawi - avatar
+ 1
10th Aug 2018, 3:51 PM
hinanawi
hinanawi - avatar
+ 1
Țucudean Adrian-Ionuț i'm aware of that, and you should have an array for both hands as well as one for the table. comparing would then be easy as all the values are instantly accessible
10th Aug 2018, 3:52 PM
hinanawi
hinanawi - avatar
+ 1
i guess i can make some comparations
10th Aug 2018, 3:54 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
0
but i need to connect the hands with the table
10th Aug 2018, 3:48 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
0
each player has 2 random cards
10th Aug 2018, 3:51 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
0
soo the cards in the hand must find its double on those cards on the table (or triple) if my hand is more powerfull (bigger double ) then i win
10th Aug 2018, 3:53 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
0
that is in interesting problem
10th Aug 2018, 3:53 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar
0
like making a counter for pairs then comparing the pair from both hands
10th Aug 2018, 3:55 PM
Țucu🇷🇴
Țucu🇷🇴 - avatar