# triple-game

> Triple Town like game

Latest version **2.0.7** (published 2018-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install triple-game
pnpm add triple-game
yarn add triple-game
bun add triple-game
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2018-11-10 |
| First published | 2018-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Willi Commer |
| Maintainers | willicommer |
| Keywords | game |

## Links

- npm: https://www.npmjs.com/package/triple-game
- Repository: https://github.com/WilliCommer/triple-game
- Homepage: https://github.com/WilliCommer/triple-game#readme
- Issues: https://github.com/WilliCommer/triple-game/issues
- npm.io page: https://npm.io/package/triple-game

## Recent versions

- 2.0.7 (latest) — 2018-11-10
- 2.0.5 — 2018-11-04
- 2.0.4 — 2018-10-28
- 2.0.3 — 2018-10-25
- 2.0.2 — 2018-10-24

## README

# Triple Game

[![npm version](https://badge.fury.io/js/triple-game.svg)](https://badge.fury.io/js/triple-game)
[![GitHub version](https://badge.fury.io/gh/willicommer%2Ftriple-game.svg)](https://badge.fury.io/gh/willicommer%2Ftriple-game)
[![wcs badge](http://familiecommer.de/files/img/author-wcs-blue.svg)](http://WilliCommer.de)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)

>  
> Javascript game like triple town
>  


## Installation
```
npm install triple-game
```

## Docs

+ [Triple Game API][TripleGameApi]
+ [Game Event API][game-events]


## Module
```
const game = require('triple-game');
```

| export | decription |
|-------|----|
| Game           | game engine class |
| TripleGame     | same as game |
| Pos            | class Pos |
| Board          | class Board |
| TRIPLE_FIG     | figure constant definitions |
| figures        | figure definitions |
| figureProp     | function |
| figureList     | function |
| figureById     | function |
| figureImgUrl   | function |

## Use the bundle

The bundle sets global variable _TripleGame_.

```html
<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][demo-angular] 

#### Start browser game (react)

[demo/html-react/index.html][demo-react]

## Related

A three.js game with triple-game [Triple Three][Triple Three]


## License

__MIT__

## History
+ 2.0.5 add bundle and remove inputloop from dependencies
+ 2.0.4 bugfix


[Triple Three]: https://github.com/WilliCommer/TripleThree
[TripleGameApi]: docs/TripleGameApi.html
[game-events]: docs/game-events.html
[demo-angular]: demo/html-angular/index.html
[demo-react]: demo/html-react/index.html

---
_Source: https://npm.io/package/triple-game · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
