Code Monkey home page Code Monkey logo

hangman's Introduction

Hangman

This is a simple website hangman implementation in TypeScript.

Play it here: Hangman game website.

Status

master:
Build Status Release License

Features

  • Offline capable web app (except for getting the words)
  • Menu, which leads to the game or the about page
  • Use the provided on-screen keyboard or a real keyboard
  • Animated hanging stick figure
  • Requests nouns from Krautipsum
  • Landscape and portrait mode

Sources

The code is in the src directory. The src/sw directory contains the service worker. The src/game, src/ui and src/word-providing directories contain the Hangman game implementation, which is used by index.ts. The test directory contains test cases.

The build framework uses webpack to generate a single js file for the application and compile the sw.js. The tests are run without webpack. Gulp handles the general tool chain.

Use npm run build to trigger the default test and build gulp job. The generated files will end up in a ./public/$npm_version folder.

The build file also manipulates the service worker file, in which it places the current version from package.json.

Prerequisites

  • The npm scripts in package.json are currently focussing on Linux. MacOS might work to.
  • ImageMagic is needed to convert the icon.svg to icon.png (using convert).
  • Node is required to do everything.

The other dependencies are listed in package.json and can be installed with npm i.

hangman's People

Contributors

atennert avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hangman's Issues

npm scripts not cross-platform

Hi,
I have a suggestion explained here https://techblog.dorogin.com/writing-cross-platform-npm-scripts-on-windows-79c510339ea6
So I used :
"devDependencies": {
"@types/chai": "^4.1.1",
"@types/mocha": "^2.2.46",
"@types/node": "^8.0.53",
"autoprefixer": "^7.1.6",
"chai": "^4.1.2",
"copyfiles": "^1.2.0", ****added
"cssmin": "^0.4.3",
"mkdirp": "^0.5.1", ****added
"mocha": "^4.0.1",
"node-sass": "^4.7.2", ****added
"npm-run-all": "^4.1.2",
"postcss-cli": "^4.1.1",
"rimraf": "^2.6.2", ****added
"sass-lint": "^1.12.1",
"svgexport": "^0.3.2", ****added
"ts-loader": "^3.2.0",
"ts-mockito": "^2.2.7",
"ts-node": "^3.3.0",
"tslint": "^5.8.0",
"typescript": "^2.6.2",
"uglify-es": "^3.3.3",
"webpack": "^3.10.0"
},
"dependencies": {
"phantomjs-prebuilt": "^2.1.16" ****added
}

Multiple message popups

Switching between menu and game screen causes multiple message popups to appear, when the game ends. Additionally, things are added at the bottom of the page, so it's possible to scroll, but it shouldn't be.

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.