示例#1
0
        public void setUpSimulate()
        {
            manager = new GameBoardManager(n, player);
            Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            {

                mediaPlayer = new MediaPlayer();
                mediaPlayer.Open(new Uri(@"C:\Users\Ryan\Music\music\4 Non Blondes\heyhey.wav"));

                mediaPlayer.Play(); // can also use soundPlayer.PlaySync()
            }));

            //Application.Current.Dispatcher.BeginInvoke(new Action(() => { Application.Current.Shutdown(); }), null);
        }
示例#2
0
        public SinglePlayerView(int n)
        {
            this.n = n;
            InitializeComponent();
            Pause_QuitButton.Click += Pause_QuitButton_Click;

            myPanel.Children.Add(new GameBoardLeftAccessoriesView());
            myPanel.Children.Add(new MainGameBoardView());
            myPanel.Children.Add(new GameBoardRightAccessoriesView());

            Application.Current.MainWindow.KeyDown += MainWindow_KeyDown;

            player = new HumanPlayer();
            manager = null;
        }
示例#3
0
 public abstract HashSet<int> getMoves(GameBoardManager manager);
示例#4
0
 public override HashSet<int> getMoves(GameBoardManager manager)
 {
     HashSet<int> ret = new HashSet<int>(moves);
     moves = new ConcurrentBag<int>();
     return ret;
 }