Ejemplo n.º 1
0
 private void SetupGamer()
 {
     this.player = new Gamer();
     var form = new GameForm();
     IRenderer renderer = new GuiRenderer(form);
     IInputHandlerer handler = new GuiInputHandlerer();
     this.engine = new GameEngine(renderer, handler);
 }
Ejemplo n.º 2
0
        private void button8_Click(object sender, EventArgs e)
        {
            playerName = this.textBox1.Text;

            gm = new GameForm(dificulty, playerName);
            gm.Show();

            this.Hide();
        }
Ejemplo n.º 3
0
        public void update(GameForm gameForm, GameState state)
        {
            // list GameState info
            playersInfo = new List<Label>();
            foreach (Player player in state.players)
               playersInfo.Add( displayPlayerInfo(player, false));

            //show options
        }
Ejemplo n.º 4
0
        private void CreateGameButton_Click(object sender, EventArgs e)
        {
            int numPlayers = Convert.ToInt32(PlayerCountBox.Text);
            int numChips = Convert.ToInt32(ChipCountBox.Text);

            GameForm game = new GameForm(numPlayers, numChips);

            game.ShowDialog();
        }
Ejemplo n.º 5
0
 public void startGame(GameState state)
 {
     GameForm gameForm = new GameForm();
     update(gameForm, state);
 }