private void GameView_Load(object sender, EventArgs e) { YahtzeeView yahtzeeView = controller.GetYahtzeeView(); ScoreboardView scoreboardView = controller.GetScoreboardView(); yahtzeeView.Location = new Point(0, scoreboardView.Height); Controls.Add(scoreboardView); Controls.Add(yahtzeeView); }
private void GameView_Load(object sender, EventArgs e) { ScoreView scoreboard = gameController.getViewScoreboard(); YahtzeeView yahtzee = gameController.getViewYahtzee(); yahtzee.Location = new Point(0, scoreboard.Height); Controls.Add(scoreboard); Controls.Add(yahtzee); }
public YahtzeeController(GameController c) { gameController = c; model = new YahtzeeModel(this); view = new YahtzeeView(this); dices = new DiceController[model.AmountOfDice]; for (int i = 0; i < dices.Length; i++) { dices[i] = new DiceController(); } }
public YahtzeeController(int plNum, YahtzeeStart ys) { scoreboard = new ScoreboardController(this); model = new YahtzeeModel(); model.PlayerNumber = plNum; view = new YahtzeeView(this); startController = ys; view.Show(); //Laat form verschijnen scoreboard.model.Dice = new int[model.AantalTeerlingen]; for (int i = 0; i < model.AantalTeerlingen; i++) { //Maak instantie aan van TeerlingController //Voeg teerling toe aan het formulier via YahtzeeView model.Teerlingen.Add(new TeerlingController(i, this)); TeerlingView teerlingView = model.Teerlingen[i].getView(); view.MakeDice(teerlingView, i); } }
public YahtzeeController(GameController gameController) { container = gameController; yahtzeeView = new YahtzeeView(this); yahtzeeModel = new YahtzeeModel(); }
public YahtzeeController(GameController GameController) { _gameController = GameController; _view = new YahtzeeView(this); _model = new YahtzeeModel(); }