473,486 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need helps with my poker hands evaluation code

1 New Member
Here is what I have so far
Expand|Select|Wrap|Line Numbers
  1.  Public Class PokerHands
  2.  
  3. Sub InputFormat() 'Function to remove space and change characters to UPPER CASE
  4.         InputDisplay.Text = InputDisplay.Text.Replace(" ", "").Replace(",","").ToUpper
  5.     End Sub
  6.  
  7.     Sub FourOfaKind() 'Four of a Kind
  8.  
  9.     End Sub
  10.  
  11.     Sub ThreeOfaKind() 'Three of a Kind
  12.  
  13.     End Sub
  14.  
  15.     Sub Pair() 'A pair
  16.  
  17.     End Sub
  18.  
  19.     Sub Flush() 'A flush
  20.  
  21.     End Sub
  22.  
  23.     Sub Straight() ' A straight, if ace is low
  24.  
  25.     End Sub
  26.  
  27.     Sub AceStraight() 'An ace-high straight; 10, J, Q, K, A
  28.  
  29.     End Sub
  30.  
  31.  
  32.     Private Sub InputDisplay_TextChanged(ByVal sender As Object, e As EventArgs) Handles InputDisplay.TextChanged
  33.  
  34.  
  35.  
  36.     End Sub
  37.  
  38.     Private Sub Button1_Click(ByValsender As Object, e As EventArgs) Handles Button1.Click
  39.         Dim hands(4, 13) As Integer 'Example: If (2,11) = 1 then is JD
  40.         Dim SuitsValue() As String = {"S", "D", "C", "H"}
  41.  
  42.         Dim FaceValue() As String = {"2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K", "A"}
  43.     End Sub
  44.  
  45.  
  46. End Class
  47.  
Hi here is what I have my code so far. My question is how to make the program reads the user input "InputDisplay" and then display the corresponding string from the array SuitsValue and FaceValue to the listbox "OutputDisplay". For example: if the user input "aH, AS, 2D, 3C, 4C" the program will return ace of hearts, ace of spades, two of diamonds, three of clubs, and four of clubs? Also how can the program will recognize that the first letter (substring (0,1) is the FaceValue and the second letter substring(1,1) is the SuitsValue? I understand I will need a loop function to determine all five. I am sorry if I am asking stupid questions here but I am really stuck!!!

Thank you very much!
Jul 14 '14 #1
0 914

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1516
by: Søren Schimkat | last post by:
Hej Guys I´m stuck with af problem. I need to replace the HTML code in at table cell with some other HTML code. Could you please give me a hint on how to do that? Regards Søren Schimkat
7
3284
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
1
4458
by: Martin Olsen | last post by:
Hi all. I am creating a program which calculates poker odds. The program should look at the visible cards (those on your hand and those on the table) then count the cards needed to improve the...
27
5557
by: Simon Biber | last post by:
I was reading http://en.wikipedia.org/wiki/Poker_probability which has a good description of how to count the frequency of different types of poker hands using a mathematical approach. A sample...
13
2526
by: kinghippo423 | last post by:
Hello Everyone, I did a poker program in Java that essencially finds the strenght of a poker hand created Randomly. My program is doing OK...but I'm pretty sure it can be optimised. This is my...
9
4670
by: teejayem | last post by:
I am looking for some help! I am currently developing a new game for an online community. The game is called Pokino which ishalf bingo and half poker. Wierd eh?! Anyway... The final part...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.