Exemplo n.º 1
0
        public void TestIfWpfGameInitializeMethodInitializesGameWithWpfEngine()
        {
            var game = new WpfGame();
            game.Initialize();

            Assert.IsTrue(game.Engine is WpfEngine);
        }
Exemplo n.º 2
0
 private void StartGame(object sender, RoutedEventArgs e)
 {
     var playerName = this.PlayerName.Text;
     Game game = new WpfGame();
     game.Initialize();
     this.engine = game.Engine;
     this.engine.Player.Name = playerName;
     var renderer = this.engine.Renderer as WpfRenderer;
     renderer.MainWindow = this;
     this.InputGrid.Visibility = Visibility.Hidden;
     this.gridPlayField.Visibility = Visibility.Visible;
     this.Menu.Visibility = Visibility.Visible;
     game.Start();
 }