BattleShipDelta / BattleShip-Web

Front end portion of the BattleShip Delta App.
https://battleship-delta-web.herokuapp.com/
MIT License
0 stars 2 forks source link

Game container #44

Closed cashmann closed 6 years ago

cashmann commented 6 years ago

Rough markup for game container. The container has a few variables to itself in the locked object and the vals object. The former is used in enabling and disabling the submit button in the move form. The latter is tracking the changes in the form inputs so we can send them to the server on submit as our move.

The container contains a header that updates as the game state and phase do, a move form whose number of inputs change with the phase to reflect the functionality of the API, and a board which gets the props for ships, userShots, and opponentShots. The state is fetched and updated on componentDidMount using the id found in the url.