Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     Console.WriteLine("\n\t***Battleship***\n");
     PlayGame play = new PlayGame();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes gameplay phase
        /// </summary>
        /// <param name="sender">The Button</param>
        /// <param name="e">The Event</param>
        private void start(object sender, EventArgs e)
        {
            // Close set up
            grid.Children.Clear();

            // Initialize game play phase
            playGame = new PlayGame(startGame.difficulty, shipyard.buttons, startGame.name, shipyard.ships, this);

            // Add game field
            grid.Children.Add(playGame);

            // Once buttonRestart is clicked
            playGame.done += new EventHandler(restart);
        }
Ejemplo n.º 3
0
 public ComputerAI(PlayGame playGame, Difficulty difficulty)
 {
     this.playGame = playGame;
     // Set difficulty
     this.difficulty = difficulty;
 }