pao-ying-chup-playground
v0.0.2
Published
Module for my student who want to practice their node skill by create a player to challenge in hammer-paper-scrissor game.
Downloads
4
Readme
Pao Ying Chup Playground
A small module that allow people create their own combo in a module, and share to other player to do a battle
Installation
npm install pao-ying-chup-playground --save
Usage
Get Constant
var playground = require('pao-ying-chup-playground');
playground.SCRISSOR; // attack with scrissor
playground.HAMMER; // attack with scrissor
playground.PAPER; // attack with paper
Player Skeleton
var player = {name:'John Doe', combo: [playground.SCRISSOR, playground.HAMMER, playgroud.HAMMER]};
How to start a battle
var playground = require('pao-ying-chup-playground');
var player1 = ...
var player2 = ...
playground.fight(player1, player2);
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 0.0.2 Add README.md
- 0.0.1 Initial release