using System.Collections.Generic;
public const int DeckSize = 52;
public static string[] cards = new string[52];
public static string[] suit = {"♣", "♦", "♥", "♠"};
public static List<string> river = new List<string>();
public static int cash {get; set;}
public static int pot {get; set;}
public static int currentTurn {get; set;}
if (value > 0) { ante = value; }
public static int players {
set {if (value > 0) {players = value;}}
private static Random rnd = new Random();
public static void Shuffle<T>(IList<T> list)
public static bool Pair(string handA, string handB)
List<string> presentNumbers = new List<string>();
for (int x=0 ; x<Data.river.Count ; x++) {
presentNumbers.Add(Data.river[x]);
if (presentNumbers.Contains(handA.Substring(1)))
if (presentNumbers.Contains(handB.Substring(1)))
if (handA.Substring(1) == handB.Substring(1))
public static int GetStrength(string handA, string handB)
if (Methods.Pair(handA, handB))
static List<string> usedCards = new List<string>();
public static void Reset()
public static string Pull()
Random rnd = new Random();
List<string> unusedCards = new List<string>();
for (int z=0 ; z<Data.DeckSize ; z++)
if (!(usedCards.Contains(Data.cards[z])))
unusedCards.Add(Data.cards[z]);
Methods.Shuffle<string>(unusedCards);
private const int Status = 0;
private const int Personality = 1;
private const int HandA = 2;
private const int HandB = 3;
private const int TotalVars = 4;
static string[][] players = new string[5][];
public static int count = 0;
private static string[] pTypes = {"LP", "LA", "TP", "TA"};
players[count] = new string[TotalVars];
Random rnd = new Random();
players[count][Personality] = pTypes[rnd.Next(0, 4)];
public static void DealTo(int player)
players[player][HandA] = Deck.Pull();
players[player][HandB] = Deck.Pull();
public static void TurnTo(int player, string purpose)
if (players[player][Status] == "Folded") {return;}
int strength = Methods.GetStrength(players[player][HandA], players[player][HandB]);
private static void Fold(int player)
Console.WriteLine("Player {0} has folded!", player+1);
players[player][Status] = "Folded";
private bool PersonalityHas(string type, int player)
if ((players[player][Personality]).Contains(type))
public static void Main()
for (int x=0 ; x<Data.DeckSize ; x++)
if ((x%13 == 0)&&(!(x==0))) {suitIncrement++;}
Data.cards[x] = Data.suit[suitIncrement]+"A";
Data.cards[x] = Data.suit[suitIncrement]+"J";
Data.cards[x] = Data.suit[suitIncrement]+"Q";
Data.cards[x] = Data.suit[suitIncrement]+"K";
Data.cards[x] = Data.suit[suitIncrement]+Convert.ToString(x%13+1);
Console.WriteLine("How many players?");
Data.players = Convert.ToInt32(Console.ReadLine());
for (int x=0 ; x<Data.players ; x++) {
Console.WriteLine("Player {0} added!", x);
Console.WriteLine("Enter ante amount: (default is 1)");
Data.ante = Convert.ToInt32(Console.ReadLine());
for (int x=0 ; x<Data.players ; x++) {
Players.TurnTo(x, "Ante");
Data.pot = Convert.ToInt32(Console.ReadLine());