本文介绍了评估扑克牌的力量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 大家好。 我正在努力打一场扑克游戏,但我不知道如何评估7张牌的力量.. 5张牌并不难。实际上我找到了一些用5张牌做的程序,但问题是玩家手里有5张翻牌和2张牌。 我甚至都不知道如何开始....(通过数字识别卡片?1到52)或(通过数字和套装识别它们) 任何建议都会有所帮助 谢谢Hi every oneI''m trying to make a little poker game but I don''t know how to evaluate the strength of a 7 card hand..It''s not that hard with 5 cards. Actually I found some program to do that with 5 cards but the problem is that there is 5 flop cards and 2 cards that the player has in hand.I don''t even know how to start that .... (identify cards by numbers? 1 to 52) or (identify them by both numbers and suits)Any suggestion will be helpfulThanks推荐答案 不,只要认为手是阵列(7,2) 其中第一个维度是卡片,第二个维度是(1个套装,2个数字) 所以如果你想要有人扑克A'和其他3张牌,它看起来像: arr(1,1)= 1,arr(1,2)= 1 arr(2,1) = 2,arr(2,2)= 1 arr(3,1)= 3,arr(3,2)= 1 arr(4,1) = 4,arr(4,2)= 1 arr(5,1)=任何套装,arr(5,2)=任何数字 arr(6, 1)=任何套装,arr(6,2)=任何数字 arr(7,1)=任何套装,arr(7,2)=任何数字 我认为检查它们的算法不会很短,但似乎可以使用一些FOR来总结和一些SELECT CASE 试一试。 HTHno, just think the hand is an array (7,2)where the first dimension is the card, and the second dimension will be (1 the suit, 2 the number)so if you want someone to have a poker of A''s and other 3 cards, it''ll look like:arr(1,1) = 1 , arr(1,2) = 1arr(2,1) = 2 , arr(2,2) = 1arr(3,1) = 3 , arr(3,2) = 1arr(4,1) = 4 , arr(4,2) = 1arr(5,1) = any suit , arr(5,2) = any numberarr(6,1) = any suit , arr(6,2) = any numberarr(7,1) = any suit , arr(7,2) = any numberi think the algorithm to check them wont be short, but it seems doable using some FOR to sum and some SELECT CASEgive it a try.HTH 祝你好运。 如果您在编码时有任何疑问,我们将很高兴帮助你。Good luck with that.If you have any doubts while coding, we''ll be glad to help you. 这篇关于评估扑克牌的力量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 18:06