Ejemplo n.º 1
0
        public static void Run()
        {
            //on startup
            SetWindowSize();
            SetColor();
            Showbanner();
            Player.SetInitialPositon(player1);
            Player.SetInitialPositon(player2);
            Ball.SetInitialPoisition(ball);

            bool end = false;

            while (end == false)
            {
                //game
                Player.Move(player1, ball);
                Player.Move(player2, ball);
                Ball.Move(ball, player1, player2);

                Console.Clear();

                Player.DrawPosition1(player1);
                Player.DrawPosition2(player2);
                Ball.Draw(ball);

                Player.PrintScore(player1, player2);
                SlowDown();
                end = Outcome.Determine(player1, player2);
            }
        }