Beispiel #1
0
 public Game(IEnumerable<Connection> connections, Server server, Lobby lobby, GameSpecificationInfo gameSpecification)
 {
     this.connections.AddRange(connections);
     this.server = server;
     this.lobby = lobby;
     this.gameSpecification = gameSpecification;
 }
Beispiel #2
0
 public Connection(Socket socket, Server server)
 {
     this.serverSocket = new ServerSocket(socket, this);
     this.server = server;
     this.Status = ConnectionStatus.Unavailable;
     Thread t = new Thread(new ThreadStart(this.Listen));
     t.Start();
 }
Beispiel #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("MajorDomo Dominion Server version " + NetworkMessage.ProtocolMajorVersion + "." + NetworkMessage.ProtocolMinorVersion);
            int port = 4502;
            if(args.Length > 0)
            {
                if (args[0] == "log")
                {
                    Server.EnableLogging = true;
                    Console.WriteLine("Logging enabled");
                }
            }

            Server server = new Server(port);
            Thread.Sleep(Timeout.Infinite);
        }