: Defines the Battleship class with attributes for health , name , and power .

In the (Nitro) curriculum, Exercise 3.4.9, "Battleships," focuses on using else if statements to manage the state of a battleship object during an attack. Project Overview

: A getter method that returns the ship's current attack power.

At its heart, 3.4.9 Battleships adheres to the traditional 10x10 grid format. Players arrange a fleet of varying sizes (from the sprawling Carrier to the nimble Destroyer) and take turns firing coordinates. However, where previous versions often felt stagnant during the "search phase," 3.4.9 introduces tighter mechanics regarding hit confirmation.

: Initializes the ship with a name and attack power, setting initial health to 100.