Back to problems

Battleship Board (React, Frontend Onsite)

Object-Oriented Programming · Waymo · Medium

Requirements Build a React Battleship board represented as a rectangular grid of cells. A click on a cell must advance its display through three states: empty, red marker, and white marker, then return to empty. Confirm the exact meaning and order of these states before implementation. Store the ships' locations and lengths. After every click, determine which ships have all of their cells marked as hits and which ships remain unsunk, then show that information to the user.…

Checking your access…