static void Main() //the main method of the program { Console.Title = "Paul's Pong"; Console.BackgroundColor = ConsoleColor.DarkGray; Console.ForegroundColor = ConsoleColor.DarkRed; Console.SetWindowSize(80, 30); //sets the window of the console to 80 by 25 Console.BufferHeight = 30; //sets the height limit of the console Console.BufferWidth = 80; Console.Clear(); //clears the console screen (directory info etc) DrawBox(0, 0, 79, 25, ConsoleColor.DarkGray, ConsoleColor.Green, false); ball ball = new ball(); paddle paddles = new paddle(); ball.drawBall(); paddles.drawPaddle(); do { ball.updateBall(); paddles.update(); /*This slows down each process in the program to ???ms*/ System.Threading.Thread.Sleep(50); /*Program loops while escape is not false (!escape)*/ } while (!escape); }
public static void doGameUpdate() { gb.update(); pd.update(c.getMove(b.update())); }