Пример #1
0
        static void Main(string[] args)
        {
            SimulationResults results = RunSimulation(SetupData.GetTestJakob());

            //Print results
            Singletons.GetPrinter().AddEmptySpaces(2);
            PrintResults(results);
        }
Пример #2
0
 private static void PrintCardsWinRates(SimulationResults results)
 {
     Console.WriteLine("");
     Console.WriteLine("-- Win/loss rate of the cards --");
     for (int i = 0; i < results.Cardpool.Count; i++)
     {
         string toPrint = results.Cardpool[i].GetNameType() + " " + cardpoolAsTrackable[i].GetWinLossRate() + " ( Wins " + cardpoolAsTrackable[i].GetWins() + ", Losses " + cardpoolAsTrackable[i].GetLosses() + " )";
         Console.WriteLine(toPrint);
     }
 }
Пример #3
0
 private static void PrintCardsAmountOfDecksWithin(SimulationResults results)
 {
     Console.WriteLine("");
     Console.WriteLine("-- Amount of decks a card is in --");
     for (int i = 0; i < results.Cardpool.Count; i++)
     {
         string toPrint = results.Cardpool[i].GetNameType() + " " + cardpoolAsTrackable[i].GetDecksWithThis().Count;
         Console.WriteLine(toPrint);
     }
 }
Пример #4
0
 private static void PrintResults(SimulationResults results)
 {
     Console.WriteLine("RESULTS: Mathes played: " + GetTotalMatches(results.Decks) + ", decks " + results.Decks.Count);
     Console.WriteLine("Run time: " + (results.ElapsedMilliseconds / 1000).ToString() + " seconds");
     PrintCardsWinRates(results);
     PrintCardsAmountOfDecksWithin(results);
     PrintCardsBestDeckWinRate(results);
     PrintCardsBestDeckCardsIncluded(results);
     Console.WriteLine(Console.ReadLine());
 }
Пример #5
0
 private static void PrintCardsBestDeckWinRate(SimulationResults results)
 {
     Console.WriteLine("");
     Console.WriteLine("-- Win/loss rate of a cards best decks --");
     for (int i = 0; i < results.Cardpool.Count; i++)
     {
         string toPrint = null;
         if (cardpoolAsTrackable[i].GetDecksWithThis().Count > 0)
         {
             toPrint = results.Cardpool[i].GetNameType() + " " + cardpoolAsTrackable[i].GetBestDeck().GetWinLossRate() +
                       " ( Wins " + cardpoolAsTrackable[i].GetBestDeck().GetWins() + ", losses " + cardpoolAsTrackable[i].GetBestDeck().GetLosses() + ")";
         }
         else
         {
             toPrint = results.Cardpool[i].GetNameType() + " not played";
         }
         Console.WriteLine(toPrint);
     }
 }
Пример #6
0
        private static void PrintCardsBestDeckCardsIncluded(SimulationResults results)
        {
            Console.WriteLine("");
            Console.WriteLine("-- Best Deck cards --");
            for (int i = 0; i < results.Cardpool.Count; i++)
            {
                string toPrint = results.Cardpool[i].GetNameType();
                Console.WriteLine(toPrint);
                if (cardpoolAsTrackable[i].GetDecksWithThis().Count == 0)
                {
                    Console.WriteLine("    Not played");
                    continue;
                }
                var deckList = cardpoolAsTrackable[i].GetBestDeck().GetCardListCompressed();

                foreach (KeyValuePair <string, int> cardAmount in deckList)
                {
                    string toPrintDetail = cardAmount.Value + " x " + cardAmount.Key;
                    Console.WriteLine("    <" + toPrintDetail + ">");
                }
            }
        }