Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 1.97 KB

README.md

File metadata and controls

78 lines (51 loc) · 1.97 KB

Requirments

Project setup

Clone this project and install all deps

git clone [email protected]:liubko/reason-dojo-tictactoe.git
npm install

Develop

npm start
// open localhost:3000

High overview plan for the dojo

Core

Add basic types to describe the core of the game.

type player = ...;
type field = ...;
type board = ...;
type gameState = ...;

#variant, #option

Create a static UI to display a board

Styles are already included.

Board.css
Field.css

Create a waterfall of components:

| <App />
|-- <Board />
|---- <Field />

#statelessComponent, #bs.raw

Add interactivity

Add onClick handler to <Filed />, handle game logic.

#reducerComponent

Connect with API

Install bs-fetch and bs-json. Make API request and decode responses.

API: https://market.mashape.com/stujo/tic-tac-toe

#bs-fetch, #bs-json

Polishing, improvements

  • fixing any bags in game logic.
  • win/lose/draw message
  • ability to restart game