- [43ba0ff] allow optional redux enhancer (#139)
- [dd6c110] Run endPhase event (analogue to endTurn) when game ends (#144)
- [8969433] Fix bug that was causing Random code to return the same numbers.
- The
Random
API is different. There is no longer aRandom
package that you need to import. The API is attached to thectx
parameter that is passed to the moves. Take a look at http://boardgame.io/#/random for more details.
- [06d78e2] Enable SSR
- [ed09f51] Allow calling Random during setup
- [c50d5ea] fix log rendering of phases
- [eec8896] undo/redo
- MongoDB connector
boardgame.io/server
no longer has a default export, but returnsServer
andMongo
.
// v0.19
const Server = require('boardgame.io/server').Server;
// v0.18
const Server = require('boardgame.io/server');
[0c894bd] add react.js to rollup config
- [4b90e84] decouple client from React
This adds a new package boardgame.io/react
. Migrate all your
calls from:
import { Client } from 'boardgame.io/client'
to:
import { Client } from 'boardgame.io/react'
boardgame.io/client
exposes a raw JS client that isn't tied
to any particular UI framework.
-
Random API:
-
[f510b69] onTurnBegin (#109)
- [6a010c8] Debug UI: fixes related to errors in arguments (#123)
- [0572210] Exposing Client connection status to board. (#97)
- [c2ea197] make db interface async (#86)
- [9e507ce] exclude dependencies from package
- [a768f1f] remove entries from clientInfo and roomInfo on disconnect
- [11e215e] fix bug that was using the wrong playerID when calculating playerView
- [0758c7e] cascade endPhase
- [cc7d44f] retire triggers and introduce onMove instead
- [17e88ce] convert events whitelist to boolean options
- [e315b9e] add ui to NPM package
- [5b34c5d] remove pass event and make it a standard move
- [f3da742] make playerID available in ctx
- [cb09d9a] make turnOrder a globally configurable option
- [a482469] ability to specify socket server
- [2ab3dfc] end turn automatically when game ends
- [c65580d] Fix bug introduced in af3a7b5.
- [af3a7b5] Only process move reducers (on the client) and nothing else when in multiplayer mode.
Buggy fix (fixed in 0.16.7).
- [2721ad4] Allow overriding
db
implementation in Server.
PlayerView.STRIP_SECRETS
endPhaseIf
is called after each move (in addition to at the end of a turn).gameID
is namespaced on the server so that there are no clashes across game types.
props.game
is nowprops.events
(to avoid confusing it with thegame
object).
// OLD
onClick() {
this.props.game.endTurn();
}
// NEW
onClick() {
this.props.events.endTurn();
}
- Multiple game types per server!
Server
now accepts an arraygames
, and no longer takesgame
andnumPlayers
.
const app = Server({
games: [ TicTacToe, Chess ]
};
- [a61ceca]: Log turn ends correctly (even when triggered automatically by
endTurnIf
)
- [9ce42b2]: Change color in
GameLog
based on the player that made the move.
- [23d9726]: Fix bug that was causing
log
to be erased afterflow.processMove
.
boardgame.io/game
is nowboardgame.io/core
, and does not have a default export.boardgame.io/client
no longer has a default export.
// v0.16
import { Game } from 'boardgame.io/core'
import { Client } from 'boardgame.io/client'
// v0.15
import Game from 'boardgame.io/game'
import Client from 'boardgame.io/client'
victory
is nowendGameIf
, and goes inside aflow
section.- The semantics of
endGameIf
are subtly different. The game ends if the function returns anything at all. ctx.winner
is nowctx.gameover
, and contains the return value ofendGameIf
.props.endTurn
is nowprops.game.endTurn
.