2.0.7 • Published 6 years ago

triple-game v2.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Triple Game

npm version GitHub version wcs badge MIT license

Javascript game like triple town

Installation

npm install triple-game

Docs

Module

const game = require('triple-game');
exportdecription
Gamegame engine class
TripleGamesame as game
Posclass Pos
Boardclass Board
TRIPLE_FIGfigure constant definitions
figuresfigure definitions
figurePropfunction
figureListfunction
figureByIdfunction
figureImgUrlfunction

Use the bundle

The bundle sets global variable TripleGame.

<script src="js/triple-game-20-bundle.js" type="text/javascript" />

<script type="text/javascript">
  
  var game = new TripleGame.Game();
  const FIG = TripleGame.TRIPLE_FIG;
  game.userMove(1,1, FIG.BUSH);

</script>

Scripts

  • start
    runs a console game
  • test
    runs mocha test
  • bundle
    create bundle.js into /web/js folder

Play

Start a console game

npm start

Start browser game (angular)

demo/html-angular/index.html

Start browser game (react)

demo/html-react/index.html

Related

License

MIT

History

  • 2.0.5 add bundle and remove inputloop from dependencies
  • 2.0.4 bugfix
2.0.7

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago