Giter Club home page Giter Club logo

anagram-hero's Introduction

#Anagram Hero

The goal is to implement a small word puzzle game that presents the user with a mangled word and asks her to enter the correct, unmangled word. If the word to unmangle is pizza the application may present the word as zpaiz and the user must then enter P I Z Z A in this order for the solution to be accepted.

Anagram Hero in action - Caution, the following gif is 10 frames per seconds, the real UX is little bit different. alt Anagram Hero in action

Install env

Required tools NodeJS ExpressJS MongoDB Bower

Starting Server Side

The Server will provide :

  • List of possible words:

    The list of words contains - The real word, the Anagram, the best score possible for this words

  • List of last games and highscore

  • Authentication (whitout password) - using username

    To save highscores and list them

Install dependencies for the server by executing

npm install

Run the server DB app

mongod

You maybe will need to set the data path as following

mongod --dbpath /Applications/MAMP/db/mongodb/data/

Seed the database

Run the app's seeder with the following command:

node seed.js

Run the server app

Run the app with the following command:

node app.js

Then, load http://localhost:3000 in a browser to see the output.

Run the server app with auto reloading

Install the Supervisor package as global

npm install supervisor -g

Run the app with the following command:

supervisor app.js  

Test API - Curl

# get list all accounts
curl localhost:3000/users/list

# add account into db
curl -X POST --data "name=sudei" http://localhost:3000/users

# delete account into db
curl -X DELETE --data "name=sudei" http://localhost:3000/users

# get or add account into db
curl localhost:3000/users/sudei

# update highscore of given user
curl -X PUT --data "highscore=22" http://localhost:3000/users/highscore/sudei

# list words
curl localhost:3000/words

# get random word
curl localhost:3000/words/random

Starting Client Side

Install dependencies for the client by executing

bower install

Generate SASS Files via GulpJS

  1. Installing GulpJS
npm install gulp --save-dev
npm install gulp-sass --save-dev
gulp sass

Continuous Integration Tests

Installing mocha

npm install -g mocha

Server tests using mocha

By default mocha will run everything in /test

mocha server/test

anagram-hero's People

Contributors

wengerk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.