Ejemplo n.º 1
0
        public gameform(int Mode, menu par)
        {//mode=0=>regular mode=1=>client mode=2=>server
            InitializeComponent();
            options = par;
            if (Mode == 0)
            {//regular
                client_loading.Visible = false;
                StartButton.Visible    = false;
                Num_Of_Players.Visible = false;
                game = new Game(this, options.small_blind, options.num_of_players, options.starting_money);
            }

            if (Mode == 1)
            {//server
                client_loading.Visible = false;
                StartButton.Visible    = true;
                Num_Of_Players.Visible = true;
                return;
            }

            if (Mode == 2)
            {//client
                client_loading.Visible = true;
                StartButton.Visible    = false;
                Num_Of_Players.Visible = false;
                game = new Game(this);
            }

            RaiseAmount.Value   = game.SmallBlind * 4;
            RaiseAmount.Minimum = game.SmallBlind * 4;

            if (this is gameformNet == false)
            {
                game.Computer_Turn();
                HideControls();
                RaiseAmount.Maximum = game.Players[(game.Dealer + 3) % game.NumOfPlayers].Money;
            }
        }
Ejemplo n.º 2
0
 public gameformNet(int Mode, string Server_IP, menu par) : base(Mode, par)//client
 {
     client = new Client(this, Server_IP);
 }
Ejemplo n.º 3
0
 public gameformNet(int Mode, menu par) : base(Mode, par)//server
 {
     server = new Server(this);
 }
Ejemplo n.º 4
0
 public Options(menu Par)
 {
     InitializeComponent();
     Parent = Par;
 }
Ejemplo n.º 5
0
 public Client_ip(menu Paren)
 {
     InitializeComponent();
     Par = Paren;
 }