Example #1
0
        private void anotherWindowButton_Click(object sender, EventArgs e)
        {
            TowerOfHanoiForm anotherForm           = new TowerOfHanoiForm(m_workerThread);
            Controller       anotherController     = new Controller();
            FormController   anotherFormController = new FormController(anotherForm, anotherController);

            anotherForm.Show();
        }
        public void DrawPole(TowerOfHanoiForm form, int x, int y)
        {
            if (m_poleDiscs.Count != 0)
            {
                y = y - m_poleDiscs.Count * DISC_HEIGTH;

                foreach (Disc disc in m_poleDiscs)
                {
                    disc.DrawDisc(form, x, y);
                    y += DISC_HEIGTH;
                }
            }
        }
 public void DrawDisc(TowerOfHanoiForm myForm, int x, int y)
 {
     myForm.DrawDisc(x, y, m_discWidth);
 }
Example #4
0
 public FormController(TowerOfHanoiForm form, Controller controller)
 {
     this.m_form            = form;
     this.m_towerController = controller;
 }