Beispiel #1
0
        private static void ReturnCoin()
        {
            var availableChoices = new[] {1, 2};
            Console.WriteLine("How would you like to determine your coin?");
            Console.WriteLine("1. Random weighed towards low Market Cap");
            Console.WriteLine("2. Completely random");

            var choice = GetInput(availableChoices);

            var webService = WebServiceFactory.BuildWebService(WebServiceFactory.WebServiceType.CryptoCompare);
            var coinList = webService.GetAllCoins();
            webService.HydrateCoinsWithPrices(coinList, TimeFrame.Minute, 1);


            switch (choice)
            {
                case 1:
                    AssignWeights(coinList);
                    ProcessWeightedRandomChoice(coinList);
                    break;
                case 2:

                    break;
                default:
                    break;
            }

            Console.ReadLine();
        }