Exemple #1
0
 public void play()
 {
     table.resetTable();
     table.statevalue = State.Preflop;
     activePlayers = new List<Player.Player>(8);
     foreach (Player.Player p in table.players)
     {
         activePlayers.Add(p);
     }
     //table.formLockEvent.Set();
     this.table.controls.Invoke((Action)delegate
     {
         table.controls.vizualize();
     });
     setSmallBig();
     tt = new TurnThread(this);
     //preflop
     tt.doTurn(table.bigBlind, table.bigBLoc + 1);
     table.nextState();
     this.table.controls.Invoke((Action)delegate
     {
         table.controls.vizualize();
     });
     // MessageBox.Show("Kor vege!\n " + table.getHandValue(0) + "\n" + table.getHandValue(1));
     //flop
     nextTurn();
     //turn
     nextTurn();
     //river
     nextTurn();
 }
 public void play()
 {
     table.resetTable();
     table.statevalue = State.Preflop;
     activePlayers = new List<Player.Player>(8);
     foreach (Player.Player p in table.players)
     {
         activePlayers.Add(p);
     }
     //table.formLockEvent.Set();
     this.table.controls.Invoke((Action)delegate
     {
         table.controls.vizualize();
     });
     setSmallBig();
     tt = new TurnThread(this);
     //preflop
     tt.doTurn(table.bigBlind, table.nextActiveId(table.bigBLoc));
     table.nextState();
     this.table.controls.Invoke((Action)delegate
     {
         table.controls.vizualize();
     });
     //flop
     nextTurn();
     //turn
     nextTurn();
     //river
     nextTurn();
     foreach (Player.Player p in table.players)
     {
         p.cards[0].CardImage = (Bitmap)Properties.Resources.ResourceManager.GetObject(p.cards[0].CardName);
         p.cards[1].CardImage = (Bitmap)Properties.Resources.ResourceManager.GetObject(p.cards[1].CardName);
     }
     this.table.controls.Invoke((Action)delegate
     {
         table.controls.vizualize();
     });
     Thread.Sleep(3000);
 }
 public void play()
 {
     table.resetTable();
     table.statevalue = State.Preflop;
     activePlayers    = new List <Player.Player>(8);
     foreach (Player.Player p in table.players)
     {
         activePlayers.Add(p);
     }
     //table.formLockEvent.Set();
     this.table.controls.Invoke((Action) delegate
     {
         table.controls.vizualize();
     });
     setSmallBig();
     tt = new TurnThread(this);
     //preflop
     tt.doTurn(table.bigBlind, table.nextActiveId(table.bigBLoc));
     table.nextState();
     this.table.controls.Invoke((Action) delegate
     {
         table.controls.vizualize();
     });
     //flop
     nextTurn();
     //turn
     nextTurn();
     //river
     nextTurn();
     foreach (Player.Player p in table.players)
     {
         p.cards[0].CardImage = (Bitmap)Properties.Resources.ResourceManager.GetObject(p.cards[0].CardName);
         p.cards[1].CardImage = (Bitmap)Properties.Resources.ResourceManager.GetObject(p.cards[1].CardName);
     }
     this.table.controls.Invoke((Action) delegate
     {
         table.controls.vizualize();
     });
     Thread.Sleep(3000);
 }