Exemplo n.º 1
0
        // Add controls to the form
        private void Yahtzee_Load(object sender, EventArgs e)
        {
            // Make instances of the dice
            for (int i = 0; i < aantalTeerlingen; i++)
            {
                TeerlingController tijdelijkeTeerling = new TeerlingController();
                teerlingController.teerlingModel.Teerlingen.Add(tijdelijkeTeerling);

                TeerlingView tView = teerlingController.teerlingModel.Teerlingen[i].GetView();

                int horizontalPosition = i * tView.Width;
                tView.Location = new Point(horizontalPosition, 0);
                Controls.Add(tView);

                ThrowsLabel.Text = throwsText + aantalWorpen + "/" + maxAantalWorpen;
            }


            TurnView       turnView = turnController.GetView();
            ScoreBoardView sBView   = scoreBoardController.GetView();

            int turnVerticalPosition = turnView.Height + 100;

            turnView.Location = new Point(1, sBView.Height + 280);
            Controls.Add(turnView);

            MPScoreView mpScoreView = mpScoreController.GetView();
            int         mpScoreHorizontalPosition = turnView.Width;

            mpScoreView.Location = new Point(mpScoreHorizontalPosition, sBView.Height + 274);
            Controls.Add(mpScoreView);

            int scoreBoardHP = sBView.Width;

            sBView.Location = new Point(1, turnVerticalPosition - 6);
            Controls.Add(sBView);

            CheatView cheatView = cheatController.GetView();
            int       cheatHorizontalPosition = turnView.Width * 4;

            cheatView.Location = new Point(cheatHorizontalPosition - 50, turnVerticalPosition + 166);
            Controls.Add(cheatView);

            // Make sure when you click a label, you hold the score
            // Needs to be available the whole time
            scoreBoardController.HoldScore();
        }
Exemplo n.º 2
0
 public TurnController()
 {
     //maak nieuwe instantie aan van view
     view = new TurnView(this);
 }
Exemplo n.º 3
0
 public TurnController()
 {
     //maak nieuwe instantie aan van view
       view = new TurnView(this);
 }