public OPScene(Game game)
     : base(game,
         game.Content.Load<Texture2D>("blank"),
         new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
 {
     _nowLoading = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
         new DrawState(game, new Vector4(0.2f, 0.4f, 0.6f, 0f), Color.White));
     _nowLoading.Content = "Now Loading...";
     AddComponent(_nowLoading);
     _count = 200;
 }
        public GameStartMenu(Game game)
            : base(game,
                game.Content.Load<Texture2D>("startMenu"),
                new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
        {
            _startHover = false;
            _settingHover = false;
            _exitHover = false;

            _backgroundSong = game.Content.Load<SoundEffect>("EmeraldHillClassic");
            Media.Play(_backgroundSong);

            _click_ = game.Content.Load<SoundEffect>("misc_menu_4");
            _click = _click_.CreateInstance();

            _logo = new GraphComponent( game, game.Content.Load<Texture2D>("logo"),
                new DrawState(game, new Vector4(0.2f, 0.3f, 0.6f, 0.4f), Color.White));
            _logo.AddState(0.5f, new DrawState(game, new Vector4(0.2f, 0.3f, 0.6f, 0.4f), Color.White));
            _logo.AddState(0.5f, new DrawState(game, new Vector4(0.2f, 0.05f, 0.6f, 0.4f), Color.White));

            _startGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.5f, 0f, 0f), Color.White));
            _startGame.Content = "開始遊戲";
            _startGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.6f, 0f, 0f), Color.White));
            _startGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.6f, 0.2f, 0f), Color.White));

            _settingGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.6f, 0f, 0f), Color.White));
            _settingGame.Content = "遊戲設定";
            _settingGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.75f, 0f, 0f), Color.White));
            _settingGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.75f, 0.2f, 0f), Color.White));

            /*
            _exitGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.7f, 0f, 0f), Color.White));
            _exitGame.Content = "離開遊戲";
            _exitGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.7f, 0f, 0f), Color.White));
            _exitGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.7f, 0.2f, 0f), Color.White));
            */

            /*
            _copyRight = new FontComponent(game, game.Content.Load<SpriteFont>("font"),
                new DrawState(game, new Vector4(0.5f, 0.8f, 0.0f, 0.0f), Color.White));
            _copyRight.Content = "製作:灆洢(曹又霖)";
            _copyRight.AddState(0.5f, new DrawState(game, new Vector4(0.5f, 0.8f, 0.0f, 0.0f), Color.White));
            _copyRight.AddState(0.5f, new DrawState(game, new Vector4(0.25f, 0.9f, 0.5f, 0.0f), Color.White));
            */

            // AddComponent(_copyRight);
            AddComponent(_logo);
            AddComponent(_startGame);
            AddComponent(_settingGame);
            //AddComponent(_exitGame);
        }
        public GameStartMenu(Game game)
            : base(game,
                game.Content.Load<Texture2D>("blank"),
                new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
        {
            _startHover = false;
            _settingHover = false;
            _exitHover = false;

            _backgroundSong = game.Content.Load<Song>("EmeraldHillClassic");
            if (MediaPlayer.Queue.ActiveSong != _backgroundSong ||
                MediaPlayer.State == MediaState.Stopped)
                MediaPlayer.Play(_backgroundSong);

            _click = game.Content.Load<SoundEffect>("misc_menu_4");

            _logo = new GraphComponent( game, game.Content.Load<Texture2D>("logo"),
                new DrawState(game, new Vector4(0.2f, 0.3f, 0.6f, 0.4f), Color.White));
            _logo.AddState(0.5f, new DrawState(game, new Vector4(0.2f, 0.3f, 0.6f, 0.4f), Color.White));
            _logo.AddState(0.5f, new DrawState(game, new Vector4(0.2f, 0.05f, 0.6f, 0.4f), Color.White));

            _startGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.5f, 0f, 0f), Color.White));
            _startGame.Content = "開始遊戲";
            _startGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.5f, 0f, 0f), Color.White));
            _startGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.5f, 0.2f, 0f), Color.White));

            _settingGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.6f, 0f, 0f), Color.White));
            _settingGame.Content = "設定遊戲";
            _settingGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.6f, 0f, 0f), Color.White));
            _settingGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.6f, 0.2f, 0f), Color.White));

            _exitGame = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.4f, 0.7f, 0f, 0f), Color.White));
            _exitGame.Content = "離開遊戲";
            _exitGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.7f, 0f, 0f), Color.White));
            _exitGame.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.7f, 0.2f, 0f), Color.White));

            _copyRight = new FontComponent(game, game.Content.Load<SpriteFont>("font"),
                new DrawState(game, new Vector4(0.5f, 0.8f, 0.0f, 0.0f), Color.White));
            _copyRight.Content = "製作:灆洢(曹又霖)";
            _copyRight.AddState(0.5f, new DrawState(game, new Vector4(0.5f, 0.8f, 0.0f, 0.0f), Color.White));
            _copyRight.AddState(0.5f, new DrawState(game, new Vector4(0.25f, 0.9f, 0.5f, 0.0f), Color.White));

            AddComponent(_copyRight);
            AddComponent(_logo);
            AddComponent(_startGame);
            AddComponent(_settingGame);
            AddComponent(_exitGame);
        }
        public DisplaySoundSetting(Game game)
            : base(game,
                game.Content.Load<Texture2D>("blank"),
                new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
        {
            _backgroundSong = LoadSong.Load(game, "EmeraldHillClassic");
            if (MediaPlayer.Queue.ActiveSong != _backgroundSong ||
                MediaPlayer.State == MediaState.Stopped)
                MediaPlayer.Play(_backgroundSong);

            _soundAddHover = false;
            _soundMinusHover = false;
            _musicAddHover = false;
            _musicMinusHover = false;
            _backHover = false;

            _click = game.Content.Load<SoundEffect>("misc_menu_4");
            _clickError = game.Content.Load<SoundEffect>("negative_2");
            _start = game.Content.Load<SoundEffect>("save");

            _settingView = new FontComponent(game, game.Content.Load<SpriteFont>("font"),
                new DrawState(game, new Vector4(0.05f, 0.05f, 0.0f, 0.0f), Color.White));
            _settingView.AddState(0.5f, new DrawState(game, new Vector4(0.05f, 0.025f, 0.0f, 0.0f), Color.White));
            _settingView.AddState(0.5f, new DrawState(game, new Vector4(0.05f, 0.05f, 0.1f, 0.0f), Color.White));
            _settingView.Content = "設定";
            _sound = new FontComponent(game, game.Content.Load<SpriteFont>("font"),
                new DrawState(game, new Vector4(0.4f, 0.15f, 0.0f, 0.0f), Color.White));
            _sound.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.15f, 0.0f, 0.0f), Color.White));
            _sound.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.3f, 0.2f, 0.0f), Color.White));
            _sound.Content = "音效: " + Setting.SoundVolume.ToString() + "%";
            _soundAdd = new GraphComponent(game, game.Content.Load<Texture2D>("Add"),
                new DrawState(game, new Vector4(0.8f, 0.28f, 0.0f, 0.0f), Color.White));
            _soundAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.28f, 0.0f, 0.0f), Color.White));
            _soundAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.28f, 0.1f, 0.1f), Color.White));
            _soundMinus = new GraphComponent(game, game.Content.Load<Texture2D>("Minus"),
                new DrawState(game, new Vector4(0.1f, 0.28f, 0.0f, 0.0f), Color.White));
            _soundMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.28f, 0.0f, 0.0f), Color.White));
            _soundMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.28f, 0.1f, 0.1f), Color.White));

            _music = new FontComponent(game, game.Content.Load<SpriteFont>("font"),
                new DrawState(game, new Vector4(0.4f, 0.25f, 0.0f, 0.0f), Color.White));
            _music.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.25f, 0.0f, 0.0f), Color.White));
            _music.AddState(0.5f, new DrawState(game, new Vector4(0.4f, 0.4f, 0.2f, 0.0f), Color.White));
            _music.Content = "音樂: " + Setting.MusicVolume.ToString() + "%";
            _musicAdd = new GraphComponent(game, game.Content.Load<Texture2D>("Add"),
                new DrawState(game, new Vector4(0.8f, 0.38f, 0.0f, 0.0f), Color.White));
            _musicAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.38f, 0.0f, 0.0f), Color.White));
            _musicAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.38f, 0.1f, 0.1f), Color.White));
            _musicMinus = new GraphComponent(game, game.Content.Load<Texture2D>("Minus"),
                new DrawState(game, new Vector4(0.1f, 0.38f, 0.0f, 0.0f), Color.White));
            _musicMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.38f, 0.0f, 0.0f), Color.White));
            _musicMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.38f, 0.1f, 0.1f), Color.White));

            _back = new GraphComponent(game, game.Content.Load<Texture2D>("Previous"),
                new DrawState(game, new Vector4(0.68f, 0.05f, 0.13f, 0.2f), Color.White));

            AddComponent(_settingView);
            AddComponent(_sound);
            AddComponent(_soundAdd);
            AddComponent(_soundMinus);
            AddComponent(_music);
            AddComponent(_musicAdd);
            AddComponent(_musicMinus);
            AddComponent(_back);
        }
        public GameBoardScene(Game game)
            : base(game,
                game.Content.Load<Texture2D>("bg"),
                new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
        {
            _backgroundSong = game.Content.Load<SoundEffect>("SunsetParkModern");
            _victory = game.Content.Load<SoundEffect>("25");

            _backHover = false;

            _start_ = game.Content.Load<SoundEffect>("save");
            _start = _start_.CreateInstance();
            _clickError_ = game.Content.Load<SoundEffect>("negative_2");
            _clickError = _clickError_.CreateInstance();

            _board = new Board(game, game.Content.Load<Texture2D>("transparent"),
                new DrawState(game, new Vector4(0.65f, 0.5f, 0f, 0f), Color.White));
            _board.AddState(0.5f, new DrawState(game, new Vector4(0.65f, 0.5f, 0f, 0f), Color.Gray));
            _board.AddState(0.5f, new DrawState(game, new Vector4(0.35f, 0.1f, 0.6f, 0.8f), Color.Gray));

            _hareWin = new GraphComponent(game, game.Content.Load<Texture2D>("RabbitWin"),
                new DrawState(game, new Vector4(0.5f, 0.5f, 0.0f, 0.0f), Color.PowderBlue));
            _tortoiseWin = new GraphComponent(game, game.Content.Load<Texture2D>("TurtleWin"),
                new DrawState(game, new Vector4(0.5f, 0.5f, 0.0f, 0.0f), Color.PowderBlue));
            _board.AddComponent(_hareWin);
            _board.AddComponent(_tortoiseWin);

            _panel = new Container(game, game.Content.Load<Texture2D>("blank"),
                new DrawState(game, new Vector4(0f, 0f, 0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f)));
            _panel.AddState(0.5f, new DrawState(game, new Vector4(0f, 0f, 0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f)));
            _panel.AddState(0.5f, new DrawState(game, new Vector4(0f, 0f, 0.3f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f)));

            _alertMessage = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.1f, 0.25f, 0.8f, 0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)));
            _alertMessage.Content = "不能移動狀況產生!";
            _view = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState( game, new Vector4( 0.2f, 0.05f, 0.0f, 0.0f ), Color.White));
            _view.AddState(0.5f, new DrawState(game, new Vector4(0.2f, 0.05f, 0.0f, 0.0f), Color.White));
            _view.AddState(0.5f, new DrawState(game, new Vector4(0.25f, 0.05f, 0.3f, 0.0f), Color.White));
            _view.Content = "狀態";
            _stateView = new FontComponent(game, game.Content.Load<SpriteFont>("Font"),
                new DrawState(game, new Vector4(0.1f, 0.15f, 0.0f, 0.0f), Color.White));
            _stateView.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.15f, 0.0f, 0.0f), Color.White));
            _stateView.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.15f, 0.5f, 0.0f), Color.White));
            _stateView.Content = "初始化中...";
            _tortoise = new GraphComponent(game, game.Content.Load<Texture2D>("Turtle"),
                new DrawState(game, new Vector4(0.4f, 0.3f, 0.4f, 0.2f), Color.White));
            _hare = new GraphComponent(game, game.Content.Load<Texture2D>("Rabbit"),
                new DrawState(game, new Vector4(0.4f, 0.5f, 0.4f, 0.2f), Color.White));
            _rightArrow = new GraphComponent(game, game.Content.Load<Texture2D>("rightarrow"),
                new DrawState(game, new Vector4(0.1f, 0.3f, 0.4f, 0.2f), Color.White));
            _turn = Board.Turn.TortoiseTurn;
            _nomove = false;

            _back = new GraphComponent(game, game.Content.Load<Texture2D>("Previous"),
                new DrawState(game, new Vector4(0.3f, 0.75f, 0.4f, 0.2f), Color.White));

            AddComponent(_board);
            _panel.AddComponent(_view);
            _panel.AddComponent(_stateView);
            _panel.AddComponent(_alertMessage);
            _panel.AddComponent(_tortoise);
            _panel.AddComponent(_hare);
            _panel.AddComponent(_rightArrow);
            _panel.AddComponent(_back);
            AddComponent(_panel);

            _isComputed = false;
        }
        public SettingScene(Game game)
            : base(game,
                game.Content.Load<Texture2D>("blank"),
                new DrawState(game, new Vector4(2f, 0f, 1f, 1f), Color.Gray))
        {
            _backgroundSong = LoadSong.Load(game,"EmeraldHillClassic");
            if (MediaPlayer.Queue.ActiveSong != _backgroundSong ||
                MediaPlayer.State == MediaState.Stopped)
                MediaPlayer.Play(_backgroundSong);

            _plyAddHover = false;
            _plyMinusHover = false;
            _tortoiseUserHover = false;
            _tortoiseComputerHover = false;
            _hareUserHover = false;
            _hareComputerHover = false;

            _click = game.Content.Load<SoundEffect>("misc_menu_4");
            _clickError = game.Content.Load<SoundEffect>("negative_2");
            _start = game.Content.Load<SoundEffect>("save");

            _settingView = new FontComponent( game, game.Content.Load<SpriteFont>( "font" ),
                new DrawState(game, new Vector4( 0.05f, 0.05f, 0.0f, 0.0f), Color.White));
            _settingView.AddState(0.5f, new DrawState(game, new Vector4(0.05f, 0.025f, 0.0f, 0.0f), Color.White));
            _settingView.AddState(0.5f, new DrawState(game, new Vector4(0.05f, 0.05f, 0.2f, 0.0f), Color.White));
            _settingView.Content = "開始設定";
            _ply = new FontComponent( game, game.Content.Load<SpriteFont>( "font" ),
                new DrawState(game, new Vector4(0.25f, 0.15f, 0.0f, 0.0f), Color.White));
            _ply.AddState(0.5f, new DrawState(game, new Vector4(0.25f, 0.15f, 0.0f, 0.0f), Color.White));
            _ply.AddState(0.5f, new DrawState(game, new Vector4(0.25f, 0.3f, 0.3f, 0.05f), Color.White));
            _ply.Content = "Alpha-Beta最高層數: " + Setting.MaxPly.ToString();
            _plyAdd = new GraphComponent(game, game.Content.Load<Texture2D>("Add"),
                new DrawState(game, new Vector4(0.8f, 0.28f, 0.0f, 0.0f), Color.White));
            _plyAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.28f, 0.0f, 0.0f), Color.White));
            _plyAdd.AddState(0.5f, new DrawState(game, new Vector4(0.8f, 0.28f, 0.1f, 0.1f), Color.White));
            _plyMinus = new GraphComponent(game, game.Content.Load<Texture2D>("Minus"),
                new DrawState(game, new Vector4(0.1f, 0.28f, 0.0f, 0.0f), Color.White));
            _plyMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.28f, 0.0f, 0.0f), Color.White));
            _plyMinus.AddState(0.5f, new DrawState(game, new Vector4(0.1f, 0.28f, 0.1f, 0.1f), Color.White));

            _tortoise = new GraphComponent(game, game.Content.Load<Texture2D>("Turtle"),
                new DrawState(game, new Vector4(0.2f, 0.45f, 0.13f, 0.2f), Color.White));
            _hare = new GraphComponent(game, game.Content.Load<Texture2D>("Rabbit"),
                new DrawState(game, new Vector4(0.2f, 0.65f, 0.13f, 0.2f), Color.White));
            _tortoiseUser = new GraphComponent(game, game.Content.Load<Texture2D>("User"),
                new DrawState(game, new Vector4(0.5f, 0.45f, 0.13f, 0.2f), Color.White));
            _tortoiseComputer = new GraphComponent(game, game.Content.Load<Texture2D>("Computer"),
                new DrawState(game, new Vector4(0.7f, 0.45f, 0.13f, 0.2f), Color.White));
            _hareUser = new GraphComponent(game, game.Content.Load<Texture2D>("User"),
                new DrawState(game, new Vector4(0.5f, 0.65f, 0.13f, 0.2f), Color.White));
            _hareComputer = new GraphComponent(game, game.Content.Load<Texture2D>("Computer"),
                new DrawState(game, new Vector4(0.7f, 0.65f, 0.13f, 0.2f), Color.White));
            _previousPlayers = null;

            _next = new GraphComponent(game, game.Content.Load<Texture2D>("Next"),
                new DrawState(game, new Vector4(0.83f, 0.05f, 0.13f, 0.2f), Color.White));
            _back = new GraphComponent(game, game.Content.Load<Texture2D>("Previous"),
                new DrawState(game, new Vector4(0.68f, 0.05f, 0.13f, 0.2f), Color.White));

            AddComponent(_settingView);
            AddComponent(_ply);
            AddComponent(_plyAdd);
            AddComponent(_plyMinus);
            AddComponent(_tortoise);
            AddComponent(_hare);
            AddComponent(_tortoiseComputer);
            AddComponent(_tortoiseUser);
            AddComponent(_hareUser);
            AddComponent(_hareComputer);
            AddComponent(_next);
            AddComponent(_back);
        }