Esempio 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);
 }
Esempio n. 2
0
        private void button8_Click(object sender, EventArgs e)
        {
            playerName = this.textBox1.Text;

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

            this.Hide();
        }
Esempio 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
        }
Esempio 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();
        }
Esempio n. 5
0
 public void startGame(GameState state)
 {
     GameForm gameForm = new GameForm();
     update(gameForm, state);
 }