Esempio n. 1
0
        private void ShowMainWindow(SelectGameViewModel selectGameViewModel)
        {
            MainWindowViewModel viewModel = new MainWindowViewModel(new HexBoardViewModel(selectGameViewModel));

            MainWindow mainWindow = new MainWindow();

            mainWindow.DataContext = viewModel;
            this.MainWindow        = mainWindow;

            mainWindow.Show();
        }
Esempio n. 2
0
        public HexBoardViewModel(SelectGameViewModel gameData)
        {
            this.CanPlay   = true;
            this.BoardSize = gameData.SelectedBoardSize;

            this.hexGame = new HexGame(this.BoardSize);
            this.Populate();

            this.gameSummary = new GameSummary(this.hexGame, gameData.GameType);

            this.computerSkillLevel    = SkillLevelToDepth(gameData.SkillLevel);
            this.doComputerMoveCommand = new DoComputerMoveCommand(this.computerSkillLevel);
            this.CheckComputerMove();
        }
Esempio n. 3
0
 public SelectGamePage()
 {
     InitializeComponent();
     BindingContext = new SelectGameViewModel();
 }