# @dumpster-fire/boardgame.io

> library for turn-based games

Latest version **0.32.1** (published 2019-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dumpster-fire/boardgame.io
pnpm add @dumpster-fire/boardgame.io
yarn add @dumpster-fire/boardgame.io
bun add @dumpster-fire/boardgame.io
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.32.1 |
| Published | 2019-06-25 |
| First published | 2019-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10.0 |
| Dependencies | 16 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 12439 |
| Author | nicolodavis@gmail.com |
| Maintainers | billyvg |
| Keywords | react, redux, boardgames |

## Links

- npm: https://www.npmjs.com/package/@dumpster-fire/boardgame.io
- Repository: https://github.com/nicolodavis/boardgame.io
- npm.io page: https://npm.io/package/@dumpster-fire/boardgame.io

## Dependencies (16)

- [koa](https://npm.io/package/koa.md) ^2.7.0
- [uuid](https://npm.io/package/uuid.md) 3.2.1
- [immer](https://npm.io/package/immer.md) ^1.8.0
- [redux](https://npm.io/package/redux.md) ^4.0.0
- [flatted](https://npm.io/package/flatted.md) ^0.2.3
- [shortid](https://npm.io/package/shortid.md) ^2.2.14
- [koa-body](https://npm.io/package/koa-body.md) ^4.1.0
- [@koa/cors](https://npm.io/package/@koa/cors.md) ^2.2.1
- [lru-cache](https://npm.io/package/lru-cache.md) ^4.1.1
- [mousetrap](https://npm.io/package/mousetrap.md) ^1.6.1
- [socket.io](https://npm.io/package/socket.io.md) ^2.1.1
- [koa-router](https://npm.io/package/koa-router.md) ^7.2.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [koa-socket-2](https://npm.io/package/koa-socket-2.md) ^1.0.17
- [react-cookies](https://npm.io/package/react-cookies.md) ^0.1.0
- [react-dragtastic](https://npm.io/package/react-dragtastic.md) ^2.4.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.32.1 (latest) — 2019-06-25

## README

<p align="center">
  <img src="https://raw.githubusercontent.com/nicolodavis/boardgame.io/master/docs/logo.svg?sanitize=true" alt="boardgame.io" />
</p>

<p align="center">
<a href="https://www.npmjs.com/package/boardgame.io"><img src="https://badge.fury.io/js/boardgame.io.svg" alt="npm version" /></a>
<a href='https://semaphoreci.com/nicolodavis/boardgame-io'> <img src='https://semaphoreci.com/api/v1/nicolodavis/boardgame-io/branches/master/shields_badge.svg' alt='Build Status'></a>
<a href="https://coveralls.io/github/nicolodavis/boardgame.io?branch=master"><img src="https://img.shields.io/coveralls/nicolodavis/boardgame.io.svg" alt="Coveralls" /></a>
<a href="https://gitter.im/boardgame-io"><img src="https://badges.gitter.im/boardgame-io.svg" alt="Gitter" /></a>
</p>

<p align="center">
  <strong>Full Documentation: <a href="https://nicolodavis.github.io/boardgame.io">link</a></strong>
</p>

Write simple functions that describe how the game state changes
when a particular move is made. This is automatically converted
into a working game complete with online multiplayer
features, all without requiring you to write a single line of
networking or database handling code.

### Features

- **State Management**: Game state is managed seamlessly across clients, server and storage automatically.
- **Cross-platform Multiplayer**: All clients (Web / Android / iOS) are kept in sync in realtime.
- **Automatic AI**: MCTS-based bots with options to customize.
- **Game Phases**: with different game rules (including custom turn orders) per phase.
- **Prototyping**: Debugging interface to simulate moves even before you render the game.
- **Logs**: Game logs with the ability to time travel (viewing the board at an earlier state).
- **View-layer Agnostic**: Vanilla JS client with bindings for React / React Native.
- **Component Toolkit**: Components for hex grids, cards, tokens.
- **Extendable**: Subsystems (storage, networking etc.) can be replaced with custom implementations.

## Usage

### Installation

```
$ npm install --save boardgame.io
```

### Running examples in this repository

```
$ npm install
$ npm start
```

## Changelog

See [changelog](docs/CHANGELOG.md).

## Contributing

See the contributing [guidelines](CONTRIBUTING.md). Also take a look at the [roadmap](docs/roadmap.md)
to find things that you could contribute to.

## License

MIT

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