0.3.0 • Published 7 years ago
warcode-core v0.3.0
WarCode Core
Risk rules engine for browser games, bots, and multi-player game services
- Easy to use - send play move and state, receive new state
- Stateless - easily reply each player move
- Customizable - caller controls randomness, game board, and rules
- ES5 - transpiled to run in older browser and Node versions
- Small - less than 6 KB compressed
Send WarCode Core the current game state and a player's move, and it returns the updated game state.
The game rules are implemented as a state machine, and the :book: docs illustrate this using a state diagram. These diagrams make the docs easier to read, even though they are generated from the code.
Contributing
Pull requests encouraged
Style
Various tools are used to enforce the following
- Functional
- Static types
- Airbnb JavaScript Style Guide
- Prettier
- ESLint recommended
Patterns
The design is inspired by the event sourcing and State-Action-Model patterns.
Testing
Targeting 100% coverage.