Skip to content

iKethavel/reasonml-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirments

Project setup

Clone this project and install all deps

git clone git@github.com: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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published