Archive for July, 2013

pokerstars HUD and Tracker

Posted July 7, 2013 By martin

toppic4

This is a free Pokerstars HUD project currently under development by us.

psxp2play

The App is always changing and growing to allow us to understang more and more about our game. It allows us to compare our play against other winning and losing players, and allows us to find and fix leaks in our game. As always it is free of malware, free of spam, and free to everyone. If you are a vb.net programmer and have a question about it, ask anything, anytime, it will get answered.

2 Comments so far. Join the Conversation
   

Delaware Releases Draft Online Gaming Regulations

 

The Government of the US state of Delaware has released the draft proposal of its online regulations for comment by the state’s public.

Delaware is set to launch an online gaming industry in September, which will follow Nevada, which was the first US state to launch regulated online gaming back in April. The draft regulations are 27 pages long are available for comment by the Delaware pubic until the end of July.

The draft regulations state that the Delaware State Lottery will oversee the state’s online gaming industry when it is established, which would be different to how Nevada and New Jersey’s industries are run. In those states, the online gaming industry is run by state gaming regulators.

 

 

article by Bruno  de Paiva

Be the first to comment
   

PokerStars Makes Deal to Enter Online Gaming Market in New JerseyPokerStars and Resorts Casino Hotel have announced a partnership agreement that will permit the world’s leading online poker site to provide online gaming software in New Jersey.

Just one day following the revelation that PokerStars was again prevented by New Jersey courts from succeeding in their quest to buy the Atlantic Club casino comes the news that parent company Rational Group has found another way to finagle into the U.S. market. The full details of the partnership agreement have not yet been released, but both companies are ecstatic to be joining forces.

“Resorts is a fantastic partner for us and we are looking forward to launch PokerStars in the U.S. in association with the other quality brands Resorts has brought to Atlantic City,” said Mark Scheinberg, Rational Group CEO.  “We are very happy to invest in New Jersey and we are excited about building a successful relationship with Resorts.”

Resorts Casino Hotel was the first brick and mortar to open on the Atlantic City boardwalk and has previously established partnerships with other brands such as Margaritaville and Mohegan Sun. “This [PokerStars] is another blue chip partner for Resorts to complete a wonderful series of brands,” Resorts’ Company Chairman Morris Bailey told a PRNewswire reporter.

New Jersey gaming officials must still approve the partnership agreement. It’s natural to assume that the American Gaming Association will again try to intervene in keeping PokerStars from gaining the green light to form an allegiance with the landmark casino.

PokerStars has been eyeing the U.S. online poker market for quite some time. Many believe that the deal brokered with the DoJ last year that saw Rational Group acquire Full Tilt Poker was done partly to get in the good graces of U.S. authorities. PokerStars did receive the DoJ’s blessing to enter the market if possible.

In the absence of federal online poker legislation, individual states have been enacting their own laws and some are including bad actor language to keep out the likes of PokerStars, who continued operating in the U.S. post-UIGEA. New Jersey has no such provisions in its statute, making the Garden State the best opportunity to get a foot in the door of the U.S. market.

That door has now been opened by Resorts Casino and PokerStars wants in. It will be up to state gaming officials to decide upon PokerStars’ suitability as a partner. PokerStars has shown tremendous tenacity in striving to be included in the newly-regulated online poker and gambling market in the U.S. I wouldn’t bet against them at this point.

 

article by Charles Rettmuller

 

Be the first to comment
   

 This will search the Pokerstars hand history folders on your comp and trigger an event when the size of one of those hand history files changes.

I set the timer to 3 seconds and get NO processor spike at all and it catches every append to pokerstars HH files in as many tables you are on. If you plan on parsing hands just split the string in the streamreader with (vbnewline & vbnewline & vbnewline) .  Add it to an array. You will have an array of every hand played in that HH file to parse any info you need after each hand completes. You could also use lastindexof for the latest completed hand.

 

 


Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'Martin Carter – psxpoker.com Dim dir As String dir = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) 'this is the pokerstars default directory Dim MyHHpath As String = dir & "\PokerStars\HandHistory\" 'create the array to put all the directories in to search for HH files.
Dim DirList As New ArrayList 'get the subdirectories If (System.IO.Directory.Exists(dir & "\PokerStars\HandHistory")) Then GetDirectories(MyHHpath, DirList) 'this is a folder i also save HH files in DirList.Add(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString & "\HH") lstDirFile.Items.Clear() For Each x In DirList Dim files() As System.IO.FileInfo Dim dirinfo As New System.IO.DirectoryInfo(x.ToString) files = dirinfo.GetFiles("HH*Hold'em*.txt", IO.SearchOption.AllDirectories) For Each file In files 'skip the holdem omaha mixed games If file.ToString.Contains("Omaha") = True Then GoTo skipOmahaFile 'path and filename Dim FileN As String = dirinfo.ToString & "\" & file.ToString Dim filex As New FileInfo(FileN) sizeInBytes2 = filex.Length 'i use this to only add files modified today (ext.letfof is a function... ext.leftof("blah","ah") returns "bl" Dim Lastwrite As Date = eXt.LeftOf(filex.LastWriteTime, " ") 'add the size in bytes and filename to list a If Lastwrite = eXt.LeftOf(Now, " ") Then lstDirFile.Items.Add(sizeInBytes2.ToString & ", " & FileN) End If SkipOmahaFile: Next Next If lstDirFile.Items.Count = 0 Then Exit Sub Else ' populate list b from list a if its empty If lstDirFile2.Items.Count = 0 Then For i = 0 To lstDirFile.Items.Count - 1 lstDirFile2.Items.Add(lstDirFile.Items.Item(i)) Next Else 'start compare and refresh list here 'loop thru list a For i = 0 To lstDirFile.Items.Count - 1 'loop thru list b For x = 0 To lstDirFile2.Items.Count - 1 'If the 2 filenames are the same If eXt.RightOf(lstDirFile.Items.Item(i), ", ") = eXt.RightOf(lstDirFile2.Items.Item(x), ", ") Then 'if the sizes dont match then a hand has just completed If eXt.LeftOf(lstDirFile.Items.Item(i), ", ") <> eXt.LeftOf(lstDirFile2.Items.Item(x), ", ") Then 'here is the file that changed and it is read into memory Dim sr As New IO.StreamReader(eXt.RightOf(lstDirFile.Items(i), ", ").ToString) Dim Sr2 As String = sr.ReadToEnd 'your event would go here
End If End If Next Next 'now move the items from list a to list b for the next timer trigger to compare again lstDirFile2.Items.Clear() For i = 0 To lstDirFile.Items.Count - 1 lstDirFile2.Items.Add(lstDirFile.Items.Item(i)) Next End If End If End Sub

 

I collect 77 different data values from 9 players per hand and store that data on a list of 7000+ players. I parse about 2300 hands per minute on a laptop with this code. Don’t forget to handle exceptions.

1 Comment. Join the Conversation
   

30 million playchip hand on pokerstars

Posted July 2, 2013 By martin

30milhand

 

Pokerstars™ now has 50k/100k-play chip ring games. On weekdays they seat some  talented players(allot of post-black friday U.S. players) that can give some  good competition. “play chips”, these chips do have value, and they are resalable for up to 5 U.S. per mil. Great for club hosting or playing high stakes ring tables or tourneys. You can sit at a ring table with a 10 mil stack and I suggest starting the game with Tight Aggressive play until your HUD sorts out the bunch and you catch a hand. I have played a few on weekends and judging by the poor play,  Some of these players are surely buying their chips. Limping with trash with 5 to 6 people seeing the flop and 1 bet/3 call action on a garbage flop. Throw the buy out the window and be prepared for 2 or 3 calls of four times the big blind on your late position raise.  Come join the fun.

3 Comments so far. Join the Conversation
   

PSxP just moved here

Posted July 1, 2013 By martin

under-construction-sign

we just moved so please give me time to do some stuff.

wtehg wetrhgwhteg wethgwehy wethwteh wethwtehg ewthweth ewsrthwtehg te eryjheryh eryjh etyr jert yj treyj ery j etryj etry j eryjh ery je ryj etry jer yh gbrju rtny r 6yetn 6 hy juyh nj 57yt r6uj yth fj uynt j 45ytnh fd ju6 jyh rej u6 yh t  6jury hj u6 jmntyh h j6uy nt j6uj ytnh  y5tj r ytj t ujki7 6km yjnh  gko ,mgki jn  kgmj h  dhgfj hk m jnh bg dhfjgku  hugmgj fnhb gr try htujy ituy mki yjnhtbrg vtvry hturyit uyo mkiy jnthb rgv yhtu rjiytukm yjn htb rgh trnjy mku ytjn thbyg ry hbtu rnytmu yt knjthb r tmkyj nthb r ht njytmk jn thbr gv yhbnj ymk tn rthbr gv bhtj nytmk tjnthb rgv bht jny

weth

4 Comments so far. Join the Conversation
   

Evaluate a Poker Hand C#

Posted July 1, 2013 By martin
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FiveCardArray_CSharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            string[] CardValues = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace" };
            string[] CardSuits = { "Hearts", "Spades", "Clubs", "Diamonds" };
            foreach (string value in CardValues)
            {
                ddlValue1.Items.Add(value);
                ddlValue2.Items.Add(value);
                ddlValue3.Items.Add(value);
                ddlValue4.Items.Add(value);
                ddlValue5.Items.Add(value);
            }
            foreach (string value in CardSuits)
            {
                ddlSuit1.Items.Add(value);
                ddlSuit2.Items.Add(value);
                ddlSuit3.Items.Add(value);
                ddlSuit4.Items.Add(value);
                ddlSuit5.Items.Add(value);
            }
        }
        private static int GetSuit(string DropDownSuit)
        {
            int retVal = 4;
            switch (DropDownSuit)
            {
                case "Clubs":
                    retVal = 0;
                    break;
                case "Diamonds":
                    retVal = 1;
                    break;
                case "Hearts":
                    retVal = 2;
                    break;
                case "Spades":
                    retVal = 3;
                    break;
            }
            return retVal;
        }
        private static int GetFace(string DropDownFace)
        {
            int retVal = 13;
            switch (DropDownFace)
            {
                case "Ace":
                    retVal = 0;
                    break;
                case "2":
                    retVal = 1;
                    break;
                case "3":
                    retVal = 2;
                    break;
                case "4":
                    retVal = 3;
                    break;
                case "5":
                    retVal = 4;
                    break;
                case "6":
                    retVal = 5;
                    break;
                case "7":
                    retVal = 6;
                    break;
                case "8":
                    retVal = 7;
                    break;
                case "9":
                    retVal = 8;
                    break;
                case "10":
                    retVal = 9;
                    break;
                case "Jack":
                    retVal = 10;
                    break;
                case "Queen":
                    retVal = 11;
                    break;
                case "King":
                    retVal = 12;
                    break;
            }
            return retVal;
        }
        private void btnGetHand_Click(object sender, EventArgs e)
        {
            if (ddlSuit1.Text == "" | ddlSuit2.Text == "" | ddlSuit3.Text == "" | ddlSuit4.Text == "" | ddlSuit5.Text == "" |
              ddlValue1.Text == "" | ddlValue2.Text == "" | ddlValue3.Text == "" | ddlValue4.Text == "" | ddlValue5.Text == "")
            {
                MessageBox.Show("All boxes need to have a value.");
            }
            else
            {
                lblHandDisplay.Text = CreateHand();
            }
        }
        private string CreateHand()
        {
            string retHand = "";
            int[,] hand = new int[3, 12];
            //1st Card
            hand[GetSuit(ddlSuit1.Text), GetFace(ddlValue1.Text)] = 1;
            //2nd Card
            hand[GetSuit(ddlSuit2.Text), GetFace(ddlValue2.Text)] = 1;
            //3rd Card
            hand[GetSuit(ddlSuit3.Text), GetFace(ddlValue3.Text)] = 1;
            //4th Card
            hand[GetSuit(ddlSuit4.Text), GetFace(ddlValue4.Text)] = 1;
            //5th Card
            hand[GetSuit(ddlSuit5.Text), GetFace(ddlValue5.Text)] = 1;
            if (IsFlush(hand) && IsStraight(hand))
            {
                retHand = "Straight Flush";
            }
            else if (IsFourOfAKind(hand))
            {
                retHand = "4 of a Kind";
            }
            else if (IsThreeOfAKind(hand) && IsPair(hand))
            {
                retHand = "Full House";
            }
            else if (IsFlush(hand))
            {
                retHand = "Flush";
            }
            else if (IsStraight(hand))
            {
                retHand = "Straight";
            }
            else if (IsThreeOfAKind(hand))
            {
                retHand = "3 of a Kind";
            }
            else if (IsTwoPair(hand))
            {
                retHand = "2 Pairs";
            }
            else if (IsPair(hand))
            {
                retHand = "a Pair";
            }
            else
            {
                retHand = "Nothing";
            }
            return retHand;
        }
        private bool IsFlush(int[,] hand)
        {
            bool retVal = false;
            int fCount = 0, x = 0, y = 0;
            do
            {
                if (hand[x, y] == 1)
                {
                    fCount++;
                }
                y++;
                if (fCount == 5)
                {
                    retVal = true;
                    break;
                }
                else if (fCount != 5 && y == 13 && x < 4)
                {
                    y = 0;
                    x++;
                    fCount = 0;
                }
                else if (fCount != 5 && y == 13 && x == 4)
                {
                    break;
                }
            }
            while (x < 4 && y < 13);
            return retVal;
        }
        private bool IsFourOfAKind(int[,] hand)
        {
            bool retVal = false;
            int fKCount = 0, x = 0, y = 0;
            do
            {
                do
                {
                    if (hand[x, y] == 1)
                    {
                        fKCount++;
                    }
                    x++;
                }
                while (fKCount < 5 && x < 4);
                if (fKCount == 4)
                {
                    retVal = true;
                    break;
                }
                else if (fKCount > 4)
                {
                    break;
                }
                else
                {
                    y++;
                    x = 0;
                    fKCount = 0;
                }
            }
            while (x < 4 && y < 13);
            return retVal;
        }
        private bool IsStraight(int[,] hand)
        {
            bool retVal = false;
            int sCount = 0, total = 0, x = 0, y = 0;
            do
            {
                total = 0;
                x = 0;
                do
                {
                    total = total + hand[x, y];
                    x++;
                }
                while (x < 4);
                if (total > 1)
                {
                    break;
                }
                else if (total == 1)
                {
                    sCount++;
                    if (sCount == 5)
                    {
                        retVal = true;
                        break;
                    }
                }
                else if (total == 0)
                {
                    sCount = 0;
                }
                y++;
            }
            while (y < 13);
            if (sCount == 5)
            {
                return retVal;
            }
            else
            {
                int Aces, Kings, Queens, Jacks, Tens;
                Aces = hand[0, 0] + hand[1, 0] + hand[2, 0] + hand[3, 0];
                Kings = hand[0, 12] + hand[1, 12] + hand[2, 12] + hand[3, 12];
                Queens = hand[0, 11] + hand[1, 11] + hand[2, 11] + hand[3, 11];
                Jacks = hand[0, 10] + hand[1, 10] + hand[2, 10] + hand[3, 10];
                Tens = hand[0, 9] + hand[1, 9] + hand[2, 9] + hand[3, 9];
                if (Aces + Kings + Queens + Jacks + Tens == 5)
                {
                    retVal = true;
                }
                return retVal;
            }
        }
        private bool IsThreeOfAKind(int[,] hand)
        {
            bool retVal = false;
            int x = 0, y = 0, tKCount = 0;
            do
            {
                do
                {
                    if (hand[x, y] == 1)
                    {
                        tKCount++;
                    }
                    x++;
                }
                while (tKCount < 4 && x < 4);
                if (tKCount == 3)
                {
                    retVal = true;
                    break;
                }
                else if (tKCount > 3)
                {
                    break;
                }
                else
                {
                    y++;
                    x = 0;
                    tKCount = 0;
                }
            }
            while (x < 4 && y < 13);
            return retVal;
        }
        private bool IsPair(int[,] hand)
        {
            bool retVal = false;
            int x = 0;
            int y = 0;
            int pCount = 0;
            do
            {
                do
                {
                    if (hand[x, y] == 1)
                    {
                        pCount = pCount + 1;
                    }
                    x = x + 1;
                }
                while (pCount < 3 && x < 4);
                if (pCount == 2)
                {
                    retVal = true;
                    break;
                }
                else if (pCount > 2 && y > 12)
                {
                    break;
                }
                else if (pCount <= 3)
                {
                    y++;
                    x = 0;
                    pCount = 0;
                }
            }
            while (x < 4 && y < 13);
            return retVal;
        }
        private bool IsTwoPair(int[,] hand)
        {
            bool retVal = false;
            int x = 0, y = 0, pCount = 0, p2Count = 0;
            do
            {
                do
                {
                    if (hand[x, y] == 1)
                    {
                        pCount++;
                    }
                    x++;
                }
                while (pCount < 3 && x < 4);
                if (pCount == 2)
                {
                    break;
                }
                else if (pCount > 2)
                {
                    break;
                }
                else
                {
                    y++;
                    x = 0;
                    pCount = 0;
                }
            }
            while (x < 4 && y < 13);
            y++;
            x = 0;
            if (pCount == 2)
            {
                do
                {
                    do
                    {
                        if (hand[x, y] == 1)
                        {
                            p2Count++;
                        }
                        x++;
                    }
                    while (p2Count < 3 && x < 4);
                    if (pCount == 2 && p2Count == 2)
                    {
                        retVal = true;
                        break;
                    }
                    else if (p2Count > 2)
                    {
                        break;
                    }
                    else
                    {
                        y++;
                        x = 0;
                        p2Count = 0;
                    }
                }
                while (x < 4 && y < 13);
                return retVal;
            }
            else
            {
                return retVal;
            }
        }
    }
}
1 Comment. Join the Conversation
   

Evaluate a Poker Hand VB.NET

Posted July 1, 2013 By martin

 

Public Class Form1
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim CardValues As String() = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"}
        Dim CardSuits As String() = {"Hearts", "Spades", "Clubs", "Diamonds"}
        For Each value As String In CardValues
            ddlValue1.Items.Add(value)
            ddlValue2.Items.Add(value)
            ddlValue3.Items.Add(value)
            ddlValue4.Items.Add(value)
            ddlValue5.Items.Add(value)
        Next
        For Each value As String In CardSuits
            ddlSuit1.Items.Add(value)
            ddlSuit2.Items.Add(value)
            ddlSuit3.Items.Add(value)
            ddlSuit4.Items.Add(value)
            ddlSuit5.Items.Add(value)
        Next
    End Sub
    Private Function GetSuit(ByVal DropDownSuit As String) As Integer
        Dim retVal As Integer
        Select Case DropDownSuit
            Case "Clubs"
                retVal = 0
            Case "Diamonds"
                retVal = 1
            Case "Hearts"
                retVal = 2
            Case "Spades"
                retVal = 3
        End Select
        Return retVal
    End Function
    Private Function GetFace(ByVal DropDownFace As String) As Integer
        Dim retVal As Integer
        Select Case DropDownFace
            Case "Ace"
                retVal = 0
            Case "2"
                retVal = 1
            Case "3"
                retVal = 2
            Case "4"
                retVal = 3
            Case "5"
                retVal = 4
            Case "6"
                retVal = 5
            Case "7"
                retVal = 6
            Case "8"
                retVal = 7
            Case "9"
                retVal = 8
            Case "10"
                retVal = 9
            Case "Jack"
                retVal = 10
            Case "Queen"
                retVal = 11
            Case "King"
                retVal = 12
        End Select
        Return retVal
    End Function
    Private Sub btnGetHand_Click(sender As System.Object, e As System.EventArgs) Handles btnGetHand.Click
        If ddlSuit1.Text = "" Or ddlSuit2.Text = "" Or ddlSuit3.Text = "" Or ddlSuit4.Text = "" Or ddlSuit5.Text = "" Or _
            ddlValue1.Text = "" Or ddlValue2.Text = "" Or ddlValue3.Text = "" Or ddlValue4.Text = "" Or ddlValue5.Text = "" Then
            MsgBox("All boxes need to have a value.")
        Else
            lblHandDisplay.Text = CreateHand()
        End If
    End Sub
    Private Function CreateHand() As String
        Dim retHand As String = ""
        Dim hand(3, 12) As Integer
        '1st Card
        hand(GetSuit(ddlSuit1.Text), GetFace(ddlValue1.Text)) = 1
        '2nd Card
        hand(GetSuit(ddlSuit2.Text), GetFace(ddlValue2.Text)) = 1
        '3rd Card
        hand(GetSuit(ddlSuit3.Text), GetFace(ddlValue3.Text)) = 1
        '4th Card
        hand(GetSuit(ddlSuit4.Text), GetFace(ddlValue4.Text)) = 1
        '5th Card
        hand(GetSuit(ddlSuit5.Text), GetFace(ddlValue5.Text)) = 1
        If IsStraight(hand) = True AndAlso IsFlush(hand) = True Then
            retHand = "Straight Flush"
        ElseIf IsFourOfAKind(hand) = True Then
            retHand = "4 of a Kind"
        ElseIf IsThreeOfAKind(hand) = True AndAlso IsPair(hand) = True Then
            retHand = "Full House"
        ElseIf IsFlush(hand) = True Then
            retHand = "Flush"
        ElseIf IsStraight(hand) = True Then
            retHand = "Straight"
        ElseIf IsThreeOfAKind(hand) = True Then
            retHand = "3 of a Kind"
        ElseIf IsTwoPair(hand) = True Then
            retHand = "2 Pairs"
        ElseIf IsPair(hand) = True Then
            retHand = "a Pair"
        Else
            retHand = "Nothing"
        End If
        Return retHand
    End Function
    Private Function IsFlush(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim x As Integer = 0
        Dim y As Integer = 0
        Dim fCount As Integer = 0
        Do While x < 4 AndAlso y < 13
            If hand(x, y) = 1 Then
                fCount = fCount + 1
            End If
            y = y + 1
            If fCount = 5 Then
                retVal = True
                Exit Do
            ElseIf fCount <> 5 AndAlso y = 13 AndAlso x < 4 Then
                y = 0
                x = x + 1
                fCount = 0
            ElseIf fCount <> 5 AndAlso y = 13 AndAlso x = 4 Then
                Exit Do
            End If
        Loop
        Return retVal
    End Function
    Private Function IsFourOfAKind(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim x As Integer = 0
        Dim y As Integer = 0
        Dim fKCount As Integer = 0
        Do While x < 5 AndAlso y < 13
            Do While fKCount < 5 AndAlso x < 4
                If hand(x, y) = 1 Then
                    fKCount = fKCount + 1
                End If
                x = x + 1
            Loop
            If fKCount = 4 Then
                retVal = True
                Exit Do
            ElseIf fKCount > 4 Then
                Exit Do
            Else
                y = y + 1
                x = 0
                fKCount = 0
            End If
        Loop
        Return retVal
    End Function
    Private Function IsStraight(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim sCount As Integer = 0
        Dim total As Integer = 0
        Dim x As Integer = 0
        Dim y As Integer = 0
        Do While y < 13
            total = 0
            x = 0
            Do While x < 4
                total = total + hand(x, y)
                x = x + 1
            Loop
            If total > 1 Then
                Exit Do
            ElseIf total = 1 Then
                sCount = sCount + 1
                If sCount = 5 Then
                    retVal = True
                    Exit Do
                End If
            ElseIf total = 0 Then
                sCount = 0
            End If
            y = y + 1
        Loop
        If sCount = 5 Then
            Return retVal
        Else
            Dim Aces As Integer
            Dim Kings As Integer
            Dim Queens As Integer
            Dim Jacks As Integer
            Dim Tens As Integer
            Aces = hand(0, 0) + hand(1, 0) + hand(2, 0) + hand(3, 0)
            Kings = hand(0, 12) + hand(1, 12) + hand(2, 12) + hand(3, 12)
            Queens = hand(0, 11) + hand(1, 11) + hand(2, 11) + hand(3, 11)
            Jacks = hand(0, 10) + hand(1, 10) + hand(2, 10) + hand(3, 10)
            Tens = hand(0, 9) + hand(1, 9) + hand(2, 9) + hand(3, 9)
            If Aces + Kings + Queens + Jacks + Tens = 5 Then
                retVal = True
            End If
            Return retVal
        End If
    End Function
    Private Function IsThreeOfAKind(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim x As Integer = 0
        Dim y As Integer = 0
        Dim tKCount As Integer = 0
        Do While x < 4 AndAlso y < 13
            Do While tKCount < 4 AndAlso x < 4
                If hand(x, y) = 1 Then
                    tKCount = tKCount + 1
                End If
                x = x + 1
            Loop
            If tKCount = 3 Then
                retVal = True
                Exit Do
            ElseIf tKCount > 3 Then
                Exit Do
            Else
                y = y + 1
                x = 0
                tKCount = 0
            End If
        Loop
        Return retVal
    End Function
    Private Function IsPair(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim x As Integer = 0
        Dim y As Integer = 0
        Dim pCount As Integer = 0
        Do While x < 4 AndAlso y < 13
            Do While pCount < 3 AndAlso x < 4
                If hand(x, y) = 1 Then
                    pCount = pCount + 1
                End If
                x = x + 1
            Loop
            If pCount = 2 Then
                retVal = True
                Exit Do
            ElseIf pCount > 2 AndAlso y > 12 Then
                Exit Do
            ElseIf pCount <= 3 Then
                y = y + 1
                x = 0
                pCount = 0
            End If
        Loop
        Return retVal
    End Function
    Private Function IsTwoPair(ByVal hand) As Boolean
        Dim retVal As Boolean = False
        Dim x As Integer = 0
        Dim y As Integer = 0
        Dim pCount As Integer = 0
        Dim p2Count As Integer = 0
        Do While x < 4 AndAlso y < 13
            Do While pCount < 3 AndAlso x < 4
                If hand(x, y) = 1 Then
                    pCount = pCount + 1
                End If
                x = x + 1
            Loop
            If pCount = 2 Then
                Exit Do
            ElseIf pCount > 2 Then
                Exit Do
            Else
                y = y + 1
                x = 0
                pCount = 0
            End If
        Loop
        y = y + 1
        x = 0
        If pCount = 2 Then
            Do While x < 4 AndAlso y < 13
                Do While p2Count < 3 AndAlso x < 4
                    If hand(x, y) = 1 Then
                        p2Count = p2Count + 1
                    End If
                    x = x + 1
                Loop
                If pCount = 2 AndAlso p2Count = 2 Then
                    retVal = True
                    Exit Do
                ElseIf p2Count > 2 Then
                    Exit Do
                Else
                    y = y + 1
                    x = 0
                    p2Count = 0
                End If
            Loop
            Return retVal
        Else
            Return retVal
        End If
    End Function
End Class
1 Comment. Join the Conversation
   

Hit Counter provided by shuttle service from lax