Skip to content

DamianMcNulty/Anagram-Hero

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

Small word puzzle game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.8%
  • CSS 22.2%
  • HTML 13.0%