示例#1
0
        static void Main(string[] args)
        {
            string input;
            var    numberOfPlayers = 0;

            DrawInput(out input);

            while (!Int32.TryParse(input, out numberOfPlayers) || !AreAcceptableLimits(numberOfPlayers))
            {
                numberOfPlayers = 0;
                Console.Clear();
                DrawInput(out input);
            }

            PlayingField field = PlayingField.CreatePlayingField(numberOfPlayers);

            Console.WriteLine($"{'|'}{"Basket weigth:",54} {field.weight,5}kg. {'|',36}");
            DrawLine();

            field.Start();

            Thread.CurrentThread.Join(1600);
            DrawLine();

            MessageHandler m = Display.ShowWinner;

            m(Winner.GetWinner());
            Console.ReadLine();
        }