Ejemplo n.º 1
0
    public async void Start()
    {
        bool isConnected;

        if (IsServer)
        {
            isConnected = await server.Start();
        }
        else
        {
            isConnected = client.Start();
        }

        if (isConnected)
        {
            game = new FormGame(1, this, parent);
            game.Show();
            parent.Hide();

            if (IsServer)
            {
                server.Work();
            }
            else
            {
                client.Work();
            }
        }
    }
Ejemplo n.º 2
0
        private void start_game(int mode)
        {
            FormGame game = new FormGame(mode, null, this);

            Hide();
            game.Show();
        }