public Arena(PongServer server) { _server = server; Id = _nextId++; State.Value = ArenaState.NotRunning; // Some other data LeftPlayer.Paddle = new Paddle(PaddleSide.Left); RightPlayer.Paddle = new Paddle(PaddleSide.Right); }
public static void Main(string[] args) { // Setup the server int port = 6000;//int.Parse(args[0].Trim()); server = new PongServer(port); // Add the Ctrl-C handler Console.CancelKeyPress += InterruptHandler; // Run it server.Start(); server.Run(); server.Close(); }