public void TestServerClientGameVirtual() { var game = new GodGameServerClient(); // Virtual connection setup var virtualNetworkConnectorServer = new VirtualNetworkConnectorServer(); var virtualNetworkConnectorClient = virtualNetworkConnectorServer.CreateClient(); // Create var server = game.CreateServer(virtualNetworkConnectorServer); var client = game.CreateClient(virtualNetworkConnectorClient); // Initialize gameloop var engine = EngineFactory.CreateEngine(); server.AddSimulatorsToEngine(engine); client.AddSimulatorsToEngine(engine); }
public void TestServerClientGame() { var game = new GodGameServerClient(); // Create var server = game.CreateServer(null); var client = game.CreateClient(null); // Connect server.Start(); Thread.Sleep(1000); client.ConnectToServer("127.0.0.1", server.TcpPort); // Initialize gameloop var engine = EngineFactory.CreateEngine(); server.AddSimulatorsToEngine(engine); client.AddSimulatorsToEngine(engine); }