Exemplo n.º 1
0
 public void Unsubscribe(GameControl game)
 {
     game.GameBegin -= new EventHandler(game_GameBegin);
     game.ReceiveUpdateControls -= new EventHandler(game_ReceiveUpdateControls);
     game.LostUpdateControls -= new EventHandler(game_LostUpdateControls);
     game.UpdateCards -= new EventHandler(game_UpdateCards);
     game.DilerUpdate -= new EventHandler(game_DilerUpdate);
     mainform.playersTime.Tick -= new EventHandler(playersTime_Tick);
 }
Exemplo n.º 2
0
        public Table(int numplay, String _playername, int initstack, GameControl game)
        {
            players = new List<Player>(2);
            cards = new List<Card>(5);
            carddeck = new CardDeck();

            players.Add(new Human(_playername, initstack, game));
            mainplayer = (Human)players[0];
            gamelog = new GameLog();

            players.Add(new AIPlayer("Аркадий", initstack, game));
            sblind = 2;
            roundnum = 1;
        }
Exemplo n.º 3
0
 public void Unsubscribe(GameControl game)
 {
     foreach (Player p in players) p.Unsubscribe(game);
     game.UpdateBank -= new EventHandler(game_PlayerMoved);
     game.MoveEnd -= new EventHandler(game_MoveEnd);
     gamelog.Unsubscribe(game);
 }
Exemplo n.º 4
0
 public void Unsubscribe(GameControl game)
 {
     game.GameEnd -= new EventHandler(game_GameEnd);
     game.Unsubscribe(game);
 }
Exemplo n.º 5
0
 public void Subscribe(GameControl game)
 {
     game.GameEnd += new EventHandler(game_GameEnd);
 }
Exemplo n.º 6
0
 public MainForm()
 {
     InitializeComponent();
     game = new GameControl(ngform, this);
     Subscribe(game);
 }
Exemplo n.º 7
0
 public Render(GameControl _game, MainForm _mainform)
 {
     game = _game;
     mainform = _mainform;
 }
Exemplo n.º 8
0
 public void Subscribe(GameControl game)
 {
     table.Subscribe(game);
     render.Subscribe(game);
     game.table.BatonMoved += new EventHandler(table_BatonMoved);
     foreach (Player p in game.table.players) p.Move += new EventHandler(p_Move);
     game.table.CardsChanged += new EventHandler(table_CardsChanged);
     game.table.HandsUp += new EventHandler(table_HandsUp);
     game.table.GameEnd += new EventHandler(table_GameEnd);
 }
Exemplo n.º 9
0
 public void Unsubscribe(GameControl game)
 {
     render.Unsubscribe(game);
     table.Unsubscribe(game);
     game.table.BatonMoved -= new EventHandler(table_BatonMoved);
     foreach (Player p in game.table.players) p.Move -= new EventHandler(p_Move);
     game.table.CardsChanged -= new EventHandler(table_CardsChanged);
     game.table.HandsUp -= new EventHandler(table_HandsUp);
     game.table.GameEnd -= new EventHandler(table_GameEnd);
 }