Start() public method

public Start ( ) : void
return void
Example #1
0
        private static void Run(String username, String deck, String serverIP, int serverPort, String password)
        {
            Init("cards.cdb");

            // Start one client and connect it to the the requested server.
            GameClient clientA = new GameClient(username, deck, serverIP, serverPort, password);
            clientA.Start();

            while (clientA.Connection.IsConnected)
            {
                clientA.Tick();
                Thread.Sleep(1);
            }
        }
Example #2
0
        private static void Run(String username, String deck, String serverIP, int serverPort, String password)
        {
            Rand = new Random();
            CardsManager.Init();
            DecksManager.Init();

            // Start two clients and connect them to the same room. Which deck is gonna win?
            GameClient clientA = new GameClient(username, deck, serverIP, serverPort, password);
            clientA.Start();
            while (clientA.Connection.IsConnected)
            {
                clientA.Tick();
                Thread.Sleep(1);
            }
        }
Example #3
0
        private static void Run()
        {
            Init("cards.cdb");

            // Start two clients and connect them to the same server. Which deck is gonna win?
            GameClient clientA = new GameClient("Wind", "Horus", "127.0.0.1", 7911);
            GameClient clientB = new GameClient("Fire", "OldSchool", "127.0.0.1", 7911);
            clientA.Start();
            clientB.Start();
            while (clientA.Connection.IsConnected || clientB.Connection.IsConnected)
            {
                clientA.Tick();
                clientB.Tick();
                Thread.Sleep(1);
            }
        }
Example #4
0
 private static void Run(string pseudo, string deck, string info)
 {
     #if !DEBUG
         GameClient clientA = new GameClient(pseudo, deck, "127.0.0.1", port, info);
     #endif
     #if DEBUG
     GameClient clientA = new GameClient(pseudo, deck, "127.0.0.1", port, info);
     #endif
     clientA.Start();
     Console.WriteLine("Connexion réussi au port : " + port + " Pseudo -> " + pseudo + " Deck -> " + deck);
     Game.Add(clientA);
 }
Example #5
0
 private static void Run(string info)
 {
     int DeckNum = Rand.Next(11);
     #if !DEBUG
         GameClient clientA = new GameClient("Kaibot", Deck[DeckNum], "127.0.0.1", port, info);
     #endif
     #if DEBUG
     GameClient clientA = new GameClient("Kaibot", Deck[11], "127.0.0.1", port, info);
     #endif
     clientA.Start();
     Console.WriteLine("Connexion réussi au port : " + port + " Deck -> " + Deck[11]);
     Game.Add(clientA);
 }