https://github.com/atennert/hangman
Simple hangman implementation as web app
https://github.com/atennert/hangman
game gulp hangman hangman-game pwa service-worker typescript
Last synced: 1 day ago
JSON representation
Simple hangman implementation as web app
- Host: GitHub
- URL: https://github.com/atennert/hangman
- Owner: atennert
- License: mit
- Created: 2017-11-30T18:27:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-09T20:54:24.000Z (almost 7 years ago)
- Last Synced: 2025-03-04T09:43:46.551Z (7 months ago)
- Topics: game, gulp, hangman, hangman-game, pwa, service-worker, typescript
- Language: TypeScript
- Homepage:
- Size: 180 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Hangman
This is a simple website hangman implementation in TypeScript.
Play it here: [Hangman game website](https://hangman.andreas-tennert.de).
## Status
__master__:
[](https://travis-ci.org/atennert/hangman)
[](https://github.com/atennert/hangman/releases)
[](https://opensource.org/licenses/MIT)## 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](https://krautipsum.de)
* 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`.