Esempio n. 1
0
 //Se inicia un nuevo Juego.
 private void StartNewGame(GameType gameType, GridSize selectedSize)
 {
     Game            = GameManager.NewGame(gameType); //Se Crea una nueva instancia de juego.
     Game.GameWindow = this;                          //Se le asigna la ventana.
     Game.CreateGame(selectedSize);                   //Se crea el tablero con el tamaño elegido.
     Game.SetPlayerName(PlayerNameTextBox.Text);      //Se asigna al jugador el nombre ingresado en el TextBox.
     GraphicsManager.ShowGame(this);                  //Se muestra el tablero de juego.
     Game.StartGame();                                //¡Empieza el juego!
 }
Esempio n. 2
0
 private void StartNewGame(GameType gameType, GridSize selectedSize)
 {
     Game            = GameManager.NewGame(gameType);
     Game.GameWindow = this;
     Game.CreateGame(selectedSize);
     Game.SetPlayerName(PlayerNameTextBox.Text);
     GraphicsManager.SwitchVisibility(this);
     GameWindow.Width = 800;
     Game.StartGame();
 }