static void Main() { Console.WriteLine("Welcome to the Poker Game!"); Console.WriteLine("\t" + "Enter to start game!"); NewDeal oNewDeal = new NewDeal(); Random newCard = new Random(System.DateTime.Now.Second); string _newCard = ""; for (int card = 0; card <= 3; card++) { _newCard = oNewDeal.getCards(newCard.Next(0,oNewDeal.suit.Length - 1),newCard.Next(0,oNewDeal.rank.Length - 1)); Console.Write("{0}\n", _newCard); } Console.Read(); }
static void Main() { Console.WriteLine("Welcome to the Poker Game!"); Console.WriteLine("Pick a card?(\"no\" to exit): "); string sentinelValue = Console.ReadLine(); NewDeal oNewDeal = new NewDeal(); Random newCard = new Random(System.DateTime.Now.Second); string _newCard = ""; while (sentinelValue != "no") { _newCard = oNewDeal.getCards(newCard.Next(0, oNewDeal.suit.Length - 1), newCard.Next(0, oNewDeal.rank.Length - 1)); Console.Write("Card: {0}\n", _newCard); Console.WriteLine("Pick a card?(\"no\" to exit): "); sentinelValue = Console.ReadLine(); } Console.Read(); }