private static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); var table = new Table(); Player[] players = { new Player("Book Guy 1", new ByTheBookStrategy()), new Player("Book Guy 2", new ByTheBookStrategy()), //new Player("Bad guy 1", new ImbicileStrategy()), //new Player("Mad man", new RandomStrategy()), }; var dealer = new Player("Dealer", new DealerStrategy()); var shoe = new Shoe(7); for (var i = 0; i < 10000; i++) { if (shoe.NeedsNewShoe()) { shoe = new Shoe(7); } table.PlayHand(shoe, players, dealer); } ReportStats(players, dealer); Console.Read(); }
private static void Main(string[] args) { //File.Delete(@"C:\tmp\test.txt"); //var k = new TextWriterTraceListener(@"C:\tmp\test.txt"); //Trace.Listeners.Add(k); Trace.Listeners.Add(new ConsoleTraceListener()); var table = new Table(5, 10); table.AddPlayer("Book Guy 1", new ByTheBookStrategy()); table.AddPlayer("Ex-dealer", new DealerStrategy()); //table.AddPlayer("Bad guy 1", new ImbicilePlayer()); table.AddPlayer("Book Guy 2", new ByTheBookStrategy()); table.AddPlayer("Bad guy 1", new ImbicileStrategy()); table.AddPlayer("Mad man", new RandomStrategy()); for (var i = 0; i < 10000; i++) { table.PlayHand(); } table.ReportStats(); Console.Read(); }
private static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); var table = new Table(); Player[] players = { new Player("Book Guy 1", new ByTheBookStrategy()), new Player("Book Guy 2", new ByTheBookStrategy()), //new Player("Bad guy 1", new ImbicileStrategy()), //new Player("Mad man", new RandomStrategy()), }; var dealer = new Player("Dealer", new DealerStrategy()); var shoe = new Shoe(7); for (var i = 0; i < 10000; i++) { if(shoe.NeedsNewShoe()) shoe = new Shoe(7); table.PlayHand(shoe, players, dealer); } ReportStats(players, dealer); Console.Read(); }