Ejemplo n.º 1
0
 public GameStateController(FieldHandler fieldHandler, GameState gameState)
 {
     this.gameState = gameState;
     this.fieldHandler = fieldHandler;
 }
Ejemplo n.º 2
0
        private void startGame_Click(object sender, EventArgs e)
        {
            EffectHandler effectHandler = new EffectHandler();
            field = new Field();
            FieldHandler fieldHandler = new FieldHandler(field, effectHandler);
            GameState gameState = new GameState();
            gameStateController = new GameStateController(fieldHandler, gameState);

            clearBoard();

            gameStateController.StartTheGame();

            player1name.Text = gameStateController.gameState.player1.Name;
            player2name.Text = gameStateController.gameState.player2.Name;
            UpdateField();
            DisplayCardList();
            UnlockAllButton();
        }