public LoadingScreen(GameOptions options)
        {
            InitializeComponent();

            Window gameWindow = new GameWindow(options);
            gameWindow.Show();
            this.Hide();
        }
 public MapWindow(GameOptions options)
 {
     InitializeComponent();
     profileManager = ProfileManager.InstanceCreator();
     InitializeProfileOnGUI(options._Player1);
     SoundManager.sfxVolume = Properties.Settings.Default.SFXVolume;
     SoundManager.musicVolume = Properties.Settings.Default.MusicVolume;
     unMuteMusicVol = SoundManager.musicVolume / 16;
     unMuteSoundVol = SoundManager.sfxVolume / 16;
     currentMusicVol = SoundManager.musicVolume / 16;
     currentSoundVol = SoundManager.sfxVolume / 16;
     SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/24.mp3", UriKind.Relative));
     SoundManager.backgroundMusicPlayer.Play();
 }
Exemplo n.º 3
0
        private void btnQuickMatch_Click(object sender, RoutedEventArgs e)
        {
            //Human vs Human
            //Idieally all this options will be set from GUI and then extracted
            //and passed to the gameOptions constructor
            string player1Name = "Diego Castillo";
            Brush player1Color = Brushes.Red;
            string player2Name = "Antonio Banderas";
            Brush player2Color = Brushes.Blue;

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.QuickMatch, player1Name, player1Color, player2Name, player2Color);
            Window gameWindow = new Game(gameOptions);
            App.Current.MainWindow = gameWindow;
            gameWindow.Show();
        }
Exemplo n.º 4
0
        private void btnQuickMatchAI_Click(object sender, RoutedEventArgs e)
        {
            //Human vs AI
            //Idieally all this options will be set from GUI and then extracted
            //and passed to the gameOptions constructor
            string player1Name = "Diego Castillo";
            Brush player1Color = Brushes.Red;
            computerAI.Difficulty  difficulty = computerAI.Difficulty.Hard;

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.AI, player1Name, player1Color, difficulty);
            Window gameWindow = new Game(gameOptions);
            App.Current.MainWindow = gameWindow;
            this.Hide();
            gameWindow.Show();
        }
Exemplo n.º 5
0
        private void btnQuickMatch_Click(object sender, RoutedEventArgs e)
        {
            //Human vs Human
            //Idieally all this options will be set from GUI and then extracted
            //and passed to the gameOptions constructor
            string player1Name = "Diego Castillo";
            bool isPlayer1Active = true;
            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/dragon1.jpg", UriKind.Absolute));
            Player player1 = new Player(player1Name, isPlayer1Active, player1Image);

            string player2Name = "Antonio Banderas";
            ImageBrush player2Image = new ImageBrush();
            player2Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/dragon2.jpg", UriKind.Absolute));
            Player player2 = new Player(player2Name, !isPlayer1Active, player2Image);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.QuickMatch, player1, player2);
            Window gameWindow = new Game(gameOptions);
            App.Current.MainWindow = gameWindow;
            gameWindow.Show();
        }
Exemplo n.º 6
0
        public MapPage(GameOptions options)
        {
            InitializeComponent();
            profileManager = ProfileManager.InstanceCreator();
            InitializeProfileOnGUI(options._Player1);
            SetUpCampaignProgress(options._Player1.Name);
            profileName = options._Player1.Name;
            SoundManager.sfxVolume = Properties.Settings.Default.SFXVolume;
            SoundManager.musicVolume = Properties.Settings.Default.MusicVolume;
            unMuteMusicVol = SoundManager.musicVolume / 16;
            unMuteSoundVol = SoundManager.sfxVolume / 16;
            currentMusicVol = SoundManager.musicVolume / 16;
            currentSoundVol = SoundManager.sfxVolume / 16;
            SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/24.mp3", UriKind.Relative));
            SoundManager.backgroundMusicPlayer.Play();

            vikingArmPivot = new Point(0, System.Windows.SystemParameters.PrimaryScreenHeight - 52);
            zero = new Point(0, 0);
            topRight = new Point(System.Windows.SystemParameters.PrimaryScreenWidth, 0);
            iceGiantArmPivot = new Point(System.Windows.SystemParameters.PrimaryScreenWidth - 261, System.Windows.SystemParameters.PrimaryScreenHeight - 600);
        }
Exemplo n.º 7
0
        private void btnQuickMatchAI_Click(object sender, RoutedEventArgs e)
        {
            //Human vs AI
            //Idieally all this options will be set from GUI and then extracted
            //and passed to the gameOptions constructor
            string player1Name = "Diego Castillo";
            bool isPlayer1Active = true;
            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/dragon1.jpg", UriKind.Absolute));
            Player player1 = new Player(player1Name, isPlayer1Active, player1Image);

            string computerPlayerName = "Miley Twerk";
            ImageBrush computerPlayerImage = new ImageBrush();
            computerPlayerImage.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/dragon2.jpg", UriKind.Absolute));
            computerAI.Difficulty difficulty = computerAI.Difficulty.Hard;
            computerAI computerPlayer = new computerAI(computerPlayerName, !isPlayer1Active, computerPlayerImage, difficulty);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.AI, player1, computerPlayer);
            Window gameWindow = new Game(gameOptions);
            App.Current.MainWindow = gameWindow;
            this.Hide();
            gameWindow.Show();
        }
Exemplo n.º 8
0
 public Game(GameOptions options)
 {
     InitializeComponent();
     gameOptions = options;
     PaintBoard();
     switch (gameOptions._TypeOfGame)
     {
         case GameOptions.TypeOfGame.QuickMatch:
             player1 = new Player(gameOptions._Player1Name, true, gameOptions._Player1Color);
             player2 = new Player(gameOptions._Player2Name, false, gameOptions._Player2Color);
             gameBrain = new GameBrain(player1);
             break;
         case GameOptions.TypeOfGame.AI:
             player1 = new Player(gameOptions._Player1Name, true, gameOptions._Player1Color);
             computerPlayer = new computerAI("I'm your boss", false, Brushes.Green, gameOptions._Difficulty);
             gameBrain = new GameBrain(player1, computerPlayer);
             if (!player1.ActivePlayer)
                 GetComputerMoveAsynchronously();
             break;
         default:
             break;
     }
     ShowActivePlayer();
 }
Exemplo n.º 9
0
 public Game(GameOptions options)
 {
     InitializeComponent();
     gameOptions = options;
     PaintBoard();
     switch (gameOptions._TypeOfGame)
     {
         case GameOptions.TypeOfGame.QuickMatch:
             player1 = options._Player1;
             player2 = options._Player2;
             gameBrain = new GameBrain(player1);
             break;
         case GameOptions.TypeOfGame.AI:
             player1 = options._Player1;
             computerPlayer = options._ComputerPlayer;
             gameBrain = new GameBrain(player1, computerPlayer);
             if (!player1.ActivePlayer)
                 GetComputerMoveAsynchronously();
             break;
         default:
             break;
     }
     ShowActivePlayer();
 }
Exemplo n.º 10
0
        private void InitializeCampaignGame(computerAI.Difficulty difficultyLevel, int levelBeingPlay)
        {
            Pentago.GameCore.ProfileManager.Profile playerProfile = profileManager.SearchProfile(profileName);
            string player1Name = playerProfile.ProfileName;

            bool isPlayer1Active = true;

            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
            ImageBrush player1ImageHover = new ImageBrush();
            player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));

            string computerPlayerName = "Computer";
            ImageBrush computerPlayerImage = new ImageBrush();
            computerPlayerImage.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));

            ImageBrush computerPlayerImageHover = new ImageBrush();
            computerPlayerImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));

            computerAI.Difficulty difficulty = difficultyLevel;

            Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);
            computerAI computerPlayer = new computerAI(computerPlayerName.Trim(), !isPlayer1Active, computerPlayerImage, computerPlayerImageHover, difficulty);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.Campaign, player1, computerPlayer, levelBeingPlay);

            GamePage game = new GamePage(gameOptions);
            NavigationService.Navigate(game);
        }
        public GameWindow(GameOptions options)
        {
            InitializeComponent();
            CreateChildrenList();
            quotes = new Quotes();
            SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/Gameplay.mp3", UriKind.Relative));
            SoundManager.backgroundMusicPlayer.Play();
            gameOptions = options;
            switch (gameOptions._TypeOfGame)
            {
                case GameOptions.TypeOfGame.QuickMatch:
                    player1 = options._Player1;
                    player2 = options._Player2;
                    gameBrain = new GameBrain(player1);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = player2.Name;
                    isNetwork = false;
                    break;
                case GameOptions.TypeOfGame.Network:
                    player1 = options._Player1;
                    player2 = options._Player2;
                    gameBrain = new GameBrain(player1);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = player2.Name;
                    networkUtil = options._NetworkUtil;
                    networkUtil.MoveReceived += new moveReceivedHandler(NetworkMoveReceived);
                    isNetwork = true;
                    break;
                case GameOptions.TypeOfGame.AI:
                    player1 = options._Player1;
                    computerPlayer = options._ComputerPlayer;
                    gameBrain = new GameBrain(player1, computerPlayer);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = computerPlayer.Name;
                    if (!player1.ActivePlayer)
                        GetComputerMoveAsynchronously();
                    isNetwork = false;
                    break;
                default:
                    break;
            }
            ShowActivePlayer();
            if(File.Exists(@"GUI\Images\CustomVikings\" + player1.Name + ".png"))
            {
                System.Drawing.Image img = System.Drawing.Image.FromFile(@"GUI\Images\CustomVikings\" + player1.Name + ".png");
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                BitmapSource bmpSrc = Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(),
                    IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
                bmp.Dispose();
                VikingButton.Background = new ImageBrush(bmpSrc);
            }
            vikingArmPivot = new Point(167 + 40, this.Height - 420 + 121);
            zero = new Point(0, 0);
            topRight = new Point(Width, 0);
            iceGiantArmPivot = new Point(Width - 261, Height - 600);

            unMuteMusicVol = SoundManager.musicVolume / 16;
            unMuteSoundVol = SoundManager.sfxVolume / 16;
            currentMusicVol = SoundManager.musicVolume / 16;
            currentSoundVol = SoundManager.sfxVolume / 16;
            restoreMusicVol(currentMusicVol);
            restoreSoundVol(currentSoundVol);

            Stream cur = File.OpenRead("GUI/images/MouseArrow.cur");
            this.Cursor = new Cursor(cur);

            InitializeDragonOrigins();
            MakeDragonsVisble();
        }
Exemplo n.º 12
0
        private void InitializePlayerVsComputerGame()
        {
            string player1Name = Player1NameTextBox.Text;

            bool isPlayer1Active;
            if (Player1MoveFirstOn.Visibility == Visibility.Visible)
                isPlayer1Active = true;
            else
                isPlayer1Active = false;

            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
            ImageBrush player1ImageHover = new ImageBrush();
            player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));
            Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);

            string computerPlayerName = "Computer";
            ImageBrush computerPlayerImage = new ImageBrush();
            computerPlayerImage.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));

            ImageBrush computerPlayerImageHover = new ImageBrush();
            computerPlayerImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));

            computerAI.Difficulty difficulty;
            if (GameDifficultyBeginnerOn.Visibility == Visibility.Visible)
                difficulty = computerAI.Difficulty.Beginner;
            else if (GameDifficultyEasyOn.Visibility == Visibility.Visible)
                difficulty = computerAI.Difficulty.Easy;
            else if (GameDifficultyMediumOn.Visibility == Visibility.Visible)
                difficulty = computerAI.Difficulty.Medium;
            else if (GameDifficultyHardOn.Visibility == Visibility.Visible)
                difficulty = computerAI.Difficulty.Medium;
            else
                difficulty = computerAI.Difficulty.Hard;

            computerAI computerPlayer = new computerAI(computerPlayerName.Trim(), !isPlayer1Active, computerPlayerImage, computerPlayerImageHover, difficulty);
            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.AI, player1, computerPlayer);

            GamePage game = new GamePage(gameOptions);
            NavigationService.Navigate(game);
        }
Exemplo n.º 13
0
        private void InitializeNetworkGame()
        {
            string player1Name = networkUtil.peerName;

            bool isPlayer1Active = networkUtil.iAmPlayer1;

            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
            ImageBrush player1ImageHover = new ImageBrush();
            player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));
            Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);

            string player2Name = networkUtil.clientName;
            ImageBrush player2Image = new ImageBrush();
            player2Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));
            ImageBrush player2ImageHover = new ImageBrush();
            player2ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));
            Player player2 = new Player(player2Name.Trim(), !isPlayer1Active, player2Image, player2ImageHover);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.Network, player1, player2, networkUtil);

            GamePage game = new GamePage(gameOptions);
            NavigationService.Navigate(game);
        }
Exemplo n.º 14
0
        private void ContineAdventure_Click(object sender, RoutedEventArgs e)
        {
            SoundManager.playSFX(SoundManager.SoundType.Click);
            try
            {
                string profileName = ProfileList.SelectedValue.ToString().Trim();
                if (profileName != "")
                {
                    Pentago.GameCore.ProfileManager.Profile playerProfile = profileManager.SearchProfile(profileName);
                    string player1Name = playerProfile.ProfileName;

                    bool isPlayer1Active = true;

                    ImageBrush player1Image = new ImageBrush();
                    player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
                    ImageBrush player1ImageHover = new ImageBrush();
                    player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));

                    string computerPlayerName = "Computer";
                    ImageBrush computerPlayerImage = new ImageBrush();
                    computerPlayerImage.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));

                    ImageBrush computerPlayerImageHover = new ImageBrush();
                    computerPlayerImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));

                    computerAI.Difficulty difficulty;
                    if (playerProfile.CampaignProgress == 0)
                        difficulty = computerAI.Difficulty.Beginner;
                    else if (playerProfile.CampaignProgress == 1)
                        difficulty = computerAI.Difficulty.Easy;
                    else if (playerProfile.CampaignProgress == 2)
                        difficulty = computerAI.Difficulty.Medium;
                    else if (playerProfile.CampaignProgress == 3)
                        difficulty = computerAI.Difficulty.Medium;
                    else
                        difficulty = computerAI.Difficulty.Hard;
                    Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);
                    computerAI computerPlayer = new computerAI(computerPlayerName.Trim(), !isPlayer1Active, computerPlayerImage, computerPlayerImageHover, difficulty);

                    GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.Campaign, player1, computerPlayer);

                    MapPage map = new MapPage(gameOptions);
                    NavigationService.Navigate(map);
                }
            }
            catch
            {
                const string message = "Please, select a profile.";
                MessageWindow messageWindow = new MessageWindow(message, MessageBoxButton.OK);
                messageWindow.ShowDialog();
            }
        }
Exemplo n.º 15
0
        private void InitializePlayerVsPlayerGame()
        {
            string player1Name = Player1NameTextBox.Text;

            bool isPlayer1Active;
            if (Player1MoveFirstOn.Visibility == Visibility.Visible)
                isPlayer1Active = true;
            else
                isPlayer1Active = false;

            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
            ImageBrush player1ImageHover = new ImageBrush();
            player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));
            Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);

            string player2Name = Player2NameTextBox.Text;
            ImageBrush player2Image = new ImageBrush();
            player2Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));
            ImageBrush player2ImageHover = new ImageBrush();
            player2ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));
            Player player2 = new Player(player2Name.Trim(), !isPlayer1Active, player2Image, player2ImageHover);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.QuickMatch, player1, player2);

            //Window loadingWindow = new LoadingScreen(gameOptions);
            Window gameWindow = new GameWindow(gameOptions);
            App.Current.MainWindow = gameWindow;
            gameWindow.Show();
            this.Hide();
        }
Exemplo n.º 16
0
        private void InitializePlayerVsPlayerGame()
        {
            string player1Name = Player1NameTextBox.Text;

            bool isPlayer1Active;
            if (Player1MoveFirstOn.Visibility == Visibility.Visible)
                isPlayer1Active = true;
            else
                isPlayer1Active = false;

            ImageBrush player1Image = new ImageBrush();
            player1Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPup.png", UriKind.Absolute));
            ImageBrush player1ImageHover = new ImageBrush();
            player1ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/RedPupHover.png", UriKind.Absolute));
            Player player1 = new Player(player1Name.Trim(), isPlayer1Active, player1Image, player1ImageHover);

            string player2Name = Player2NameTextBox.Text;
            ImageBrush player2Image = new ImageBrush();
            player2Image.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePup.png", UriKind.Absolute));
            ImageBrush player2ImageHover = new ImageBrush();
            player2ImageHover.ImageSource = new BitmapImage(new Uri("pack://application:,,,/GUI/images/BluePupHover.png", UriKind.Absolute));
            Player player2 = new Player(player2Name.Trim(), !isPlayer1Active, player2Image, player2ImageHover);

            GameOptions gameOptions = new GameOptions(GameOptions.TypeOfGame.QuickMatch, player1, player2);

            GamePage game = new GamePage(gameOptions);
            NavigationService.Navigate(game);
        }
Exemplo n.º 17
0
        public GamePage(GameOptions options)
        {
            InitializeComponent();
            CreateChildrenList();
            quotes = new Quotes();
            gameOptions = options;
            switch (gameOptions._TypeOfGame)
            {
                case GameOptions.TypeOfGame.QuickMatch:
                    SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/Gameplay.mp3", UriKind.Relative));
                    SoundManager.backgroundMusicPlayer.Play();
                    player1 = options._Player1;
                    player2 = options._Player2;
                    gameBrain = new GameBrain(player1);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = player2.Name;
                    isNetwork = false;
                    break;
                case GameOptions.TypeOfGame.Network:
                    SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/Gameplay.mp3", UriKind.Relative));
                    SoundManager.backgroundMusicPlayer.Play();
                    player1 = options._Player1;
                    player2 = options._Player2;
                    gameBrain = new GameBrain(player1);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = player2.Name;
                    networkUtil = options._NetworkUtil;
                    networkUtil.MoveReceived += new moveReceivedHandler(NetworkMoveReceived);
                    networkUtil.Disconnected += new peerDisconnectedHancler(PeerDisconnected);
                    isNetwork = true;
                    break;
                case GameOptions.TypeOfGame.AI:
                    SoundManager.backgroundMusicPlayer.Open(new Uri("GUI/Sounds/Gameplay.mp3", UriKind.Relative));
                    SoundManager.backgroundMusicPlayer.Play();
                    player1 = options._Player1;
                    computerPlayer = options._ComputerPlayer;
                    gameBrain = new GameBrain(player1, computerPlayer);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = computerPlayer.Name;
                    if (!player1.ActivePlayer)
                        GetComputerMoveAsynchronously();
                    isNetwork = false;
                    break;
                case GameOptions.TypeOfGame.Campaign:
                    profileManager = ProfileManager.InstanceCreator();
                    levelPlay = options._LevelPlay;
                    SetUpCampaign(options._LevelPlay);
                    player1 = options._Player1;
                    computerPlayer = options._ComputerPlayer;
                    gameBrain = new GameBrain(player1, computerPlayer);
                    Player1NameText.Text = player1.Name;
                    Player2NameText.Text = computerPlayer.Name;
                    if (!player1.ActivePlayer)
                        GetComputerMoveAsynchronously();
                    isNetwork = false;
                    break;

                default:
                    break;
            }
            ShowActivePlayer();
            if (File.Exists("C:\\Users\\Public\\Documents\\Dragon Horde\\" + player1.Name + ".png"))
            {
                System.Drawing.Image img = System.Drawing.Image.FromFile("C:\\Users\\Public\\Documents\\Dragon Horde\\" + player1.Name + ".png");
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                BitmapSource bmpSrc = Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(),
                    IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
                bmp.Dispose();
                VikingButton.Background = new ImageBrush(bmpSrc);
            }

            vikingArmPivot = new Point(167 + 40, System.Windows.SystemParameters.PrimaryScreenHeight - 420 + 121);
            zero = new Point(0, 0);
            topRight = new Point(System.Windows.SystemParameters.PrimaryScreenWidth, 0);
            iceGiantArmPivot = new Point(System.Windows.SystemParameters.PrimaryScreenWidth - 261, System.Windows.SystemParameters.PrimaryScreenHeight - 600);

            unMuteMusicVol = SoundManager.musicVolume / 16;
            unMuteSoundVol = SoundManager.sfxVolume / 16;
            currentMusicVol = SoundManager.musicVolume / 16;
            currentSoundVol = SoundManager.sfxVolume / 16;
            restoreMusicVol(currentMusicVol);
            restoreSoundVol(currentSoundVol);

            Stream cur = File.OpenRead("GUI/images/MouseArrow.cur");
            this.Cursor = new Cursor(cur);

            InitializeDragonOrigins();
        }
 public LoadingScreen(GameOptions options)
 {
     InitializeComponent();
 }