Exemple #1
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SettingsForm m_SettingsForm = new SettingsForm();
            DialogResult dResult        = m_SettingsForm.ShowDialog();

            if (dResult == DialogResult.OK)
            {
                DamkaController m_DamkaController = new DamkaController(m_SettingsForm.DeskSize, m_SettingsForm.NamePlayer1, m_SettingsForm.NamePlayer2, m_SettingsForm.IsTwoPlayers);
                Application.Run(new GameForm(m_DamkaController));
            }
        }
Exemple #2
0
 public GameForm(DamkaController i_GameController)
 {
     InitializeComponent();
     m_GameController    = i_GameController;
     m_Cells             = new Button[m_GameController.Size, m_GameController.Size];
     m_IsWarriorSelected = false;
     m_IsNewWarriorSelectionAvailable      = true;
     m_GameController.DeskUpdate          += new Action <eSymbols[, ], int>(updateDesk);
     m_GameController.AlertShow           += new Action <string>(showAlert);
     m_GameController.CurrentPlayerChange += new Action <object>(whenPlayerChanged);
     m_GameController.GameOver            += new Action <eGameStatus>(gameOver);
     createDesk(m_GameController.Size);
 }