GitXplorerGitXplorer
s

tic-tac-toe

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
94161c3a8036fdcba5c758029a2d5081ea8167a0

Add instruction how to run tests

sshaliko committed a year ago
Unverified
ca95bc560f4452d583c46ce303fe1b9079a47391

Update README.md

sshaliko committed a year ago
Unverified
60be978d010689a93759368c2e64fb1c2c31490a

WIP

sshaliko committed a year ago
Unverified
3012298e93db63867f00eb79d0d726f1c5e81515

WIP

sshaliko committed a year ago
Unverified
4d689638748cd0ba51fa50dbbee02919a4de3c28

Polish styles

sshaliko committed a year ago
Unverified
8f17a15cf918c7ff60c555d1f670100b0e55cc9c

Polish GameBoard logic

sshaliko committed a year ago

README

The README file for this repository.

Tic Tac Toe

Setup

Requirements

  • docker & docker-compose
  • nodejs
  • ember-cli

Backend Setup (Rails)

  • git clone git@github.com:shaliko/tic-tac-toe.git
  • cd tic-tac-toe/game_api
  • docker-compose up

API app will be started on port 3000 (http://localhost:3000/)

Run backend tests

  • docker-compose run web bundle exec rspec

Frontend Setup (EmberJS)

  • Project already cloned on previous steps
  • cd tictactoe
  • npm install
  • ember s

Frontend app will be started on port 4200 (http://localhost:4200/)

API Documentation

Games

  1. Create a New Game

Endpoint: /api/games Method: POST Payload: {} Response:

{
  "game": {
    "id": 1,
    "state": {},
    "current_symbol": "value",
    ...
  }
}
  1. Retrieve a Game Endpoint: /api/games/:id Method: GET Response:
{
  "game": {
    "id": 1,
    "state": {},
    "current_symbol": "value",
    ...
  }
}

Moves within a Game

  1. Create a New Move for a Game Endpoint: /api/games/:game_id/moves Method: POST Payload:
{
  "row": "0",
  "col": "1"
  "player_token": "xxxxxxxxxxxx"
}

Response:

{
  "game": {
    "id": 1,
    "state": {},
    "current_symbol": "value",
    ...
  }
}