Exemple #1
0
        public PawnGameDialog(TutorialOneScreen parentScreen, PawnGame pawnGame)
        {
            InitializeComponent();

            this.parentScreen = parentScreen;
            this.pawnGame = pawnGame;
            this.gameController = new GameController(false, pawnGame.GetPosition(), false, false);

            this.gameController.RaiseControllerEvent += new EventHandler<ControllerEvent>(gameController_MoveText);
            this.parentScreen.BoardArea.Content = this.gameController.board;
        }
        /// <summary>
        /// Start a pawn game
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Start_Pawn_Game_Click(object sender, RoutedEventArgs e)
        {
            currentMode = GameMode.Tutorial;
            gameController.tutorialFlag = false;

            PawnGame pawnGame = new PawnGame();

            Dialog.Content = new PawnGameDialog(this, pawnGame);

            ResetButton.Visibility = Visibility.Hidden;
        }