HTTP Requests / JSON Decoding task
(IP will be provided at the meetup)
Build a battleship game client that will allow a player to:
- Create a new game
- Join existing game
- See the board grid (10 x 10)
- Fire shots at a grid location and see the result of the shot
- See a list of on-going games
- See details of a given game
You can start with simple Http Task, see the example in SimpleTask.elm.
Then you can move on to use StartApp, which there are some skeleton files in this repo (Main.elm, Game.elm and Board.elm - but they do not compile)
git clone https://github.com/elmcph/battleships-client.git
cd battleships-client
npm install
export PATH=$PATH:./node_modules/.bin # Or equivalent on Windows
# Edit SimpleTask.elm and enter the Battleships game server host/port
elm-live SimpleTask.elm
Open [http://localhost:8000]
This example uses elm-live to compile and auto-reload. You could also use elm-server