Esempio n. 1
0
        /// <summary>
        /// Starts the game with the selected settings (game mode, game cateogry, sound and card color) by the user.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void StartGame()
        {
            GameMode.PlayingMode selectedMode     = GetSelectedMode();
            GameCategory         selectedCateogry = GetSelectedCategory();
            bool         sound         = GetSound();
            Color        selectedColor = GetColor();
            GameSettings gameSettings  = new GameSettings(selectedMode, selectedCateogry, sound, selectedColor);

            this.Hide();
            if (selectedMode == GameMode.PlayingMode.SinglePlayer)
            {
                Scene = new SingleplayerScene(gameSettings, this);
            }
            if (selectedMode == GameMode.PlayingMode.MultiPlayer)
            {
                Scene = new MultiplayerScene(gameSettings, this);
            }
            Scene.ShowDialog();
        }
Esempio n. 2
0
 public EnterNames(MultiplayerScene caller)
 {
     InitializeComponent();
     Scene = caller;
 }