Thanks for the opportunity! I look forward for the feedback!

Link for the project: https://gitlab.com/pisrael/az-mastermind.git My Linkedin: https://www.linkedin.com/in/psisrael

See the VISUAL INTERFACE and play with it! http://azmastermind.herokuapp.com/ How to play: https://www.youtube.com/watch?v=uJjvijDBIMs

SETUP YOUR DEVELOPMENT ENVIRONMENT

  • install node
  • install npm
    • Windows -> add node folder to your "Path" environment variable
    • Windows -> add to your Path environment varile
      • the npm module folder is found by running "npm config get prefix"
  • install sass compiler (http://sass-lang.com/install)
    • Windows -> add ruby bin folder to your "Path" environment variable
  • install mongo server

    • Windows -> add mongo bin folder to your "Path" environment variable
    • Windows -> create a folder at "c:/data/db", leave it empty
  • Go to the project folder in the terminal and run

    • run "npm install -g node-gyp"
    • run "npm install -g node-inspector"
    • run "npm install -g browserify"
    • run "npm install"
  • To test:

    • run "mongod" in a terminal window
    • run "./compile-client.sh" (unix) or "compile-client.bat" (windows)
    • run "./run-local.sh" (unix) or "run-local.bat" (windows)
    • Open "http://localhost:3000" in your browser, a simple page with components should open.

API CALLS

API: /new-game (POST)

  • DESCRIPTION: Creates a new game
  • OUTPUT: see at the bottom
  • INPUT
        {
            player: "Pedro Israel"
        }

API: /join-game (POST)

  • DESCRIPTION: JoinS an existing game
  • OUTPUT: see at the bottom
  • INPUT
        {
            player: "Pedro Israel"
            gameId: "XeaEssAd"
        }

API: /guess (POST)

  • DESCRIPTION: Guess a code
  • OUTPUT: see at the bottom
  • INPUT
        {
            player: "Pedro Israel"
            gameId: "XeaEssAd"
            guess: "RBGYOPCM"
        }

API: /stats (GET)

  • DESCRIPTION: Guess a code.
  • OUTPUT: see at the bottom
  • INPUT (URL QUERY): /status?gameId=XeaEssAd

EXAMPLE OF A GAME STATUS RESPONSE

{
  "gameId": "HynyVc17",
  "createdAt": "2016-05-22T20:17:40.077Z",
  "startedAt": "2016-05-22T20:19:01.263Z",
  "finishedAt": null,
  "lastUpdate": "2016-05-22T20:19:58.539Z",
  "solved": false,
  "winner": null,
  "players": [
    "Elon Musk",
    "Pedro Israel"
  ],
  "nextTurn": "Elon Musk",
  "guesses": [
    {
      "guess": "MMMMBBBB",
      "exact": 3,
      "near": 0,
      "solved": false,
      "player": "Pedro Israel",
      "round": 2
    },
    {
      "guess": "CCCCCCCC",
      "exact": 1,
      "near": 0,
      "solved": false,
      "player": "Elon Musk",
      "round": 1
    }
  ],
  "dictionary": "RBGYOPCM"
}

Built With

Share this project:
×

Updates