1.0.1 • Published 8 years ago
hangman-cli-art v1.0.1
hangman-cli-art
Hangman art for command line :+1: :-1:
Install
npm install --save hangman-cli-art
API
var HangmanArt = require('hangman-cli-art')
var art = new HangmanArt({
marginX: 5,
marginY: 5
})
art.next() // call next() to render next part
Refer source for other available options
Example
Renders hangman part by part.
var HangmanArt = require('hangman-cli-art')
var art = new HangmanArt({
marginX: 5,
marginY: 5
})
var chance = 0
var timer = setInterval(function () {
if (chance < 10) {
art.next()
chance++
} else {
clearInterval(timer)
}
}, 1000)