- [d50015d] turn order simulator
- [58e135b] fix bug that was causing ctx.events to be undefined
- [ea3754b] player needs to be in actionPlayers in order to call events
- [a352d1e] decouple once and allOthers
- [aa5f2cf] added the useNewUrlParser option to the Mongo connect() (#285)
- [e8f165a] server: add new API endpoints 'list' and 'leave' (#276)
- [8ff4745] drag-n-drop for cards and decks
- [a558092] return state as first argument to client.subscribe callback
- [965f9b7] Allow to set payload onto a log event (#267)
- [2efdbc1] utils for working with hexagonal boards (#271)
- [137dd7c] allow overriding client-side transport
- [63311ac] local game master
- [0b7a0a0] add allOthers option to setActionPlayers (#269)
- [d1a1a8a] shouldEndPhase can see the results of onTurnEnd
- [b4874a6] call the client subscribe callback after LogMiddleware has run
- [9b9d735] reset deltalog properly
- Fixed babelHelpers error in npm.
Broken, do not use (complains about babelHelpers missing).
- [ebf7e73] fix bug that was preventing playerID from being overriden by the debug ui
- [09b523e] require mongo and firebase only if used
- [fe8a9d0] Added ability to specify server protocol (#247)
- [43dcaac] write turn / phase stats in ctx.stats
- [bd8208a] fabricate playerID in singleplayer mode
- [b4e3e09] { all: true } option for setActionPlayers
- [5d3a34d] { once: true } option for setActionPlayers
- [75a274c] rename changeActionPlayers to setActionPlayers
- [4ec3a61] end phase when a turn order runs out
- [cb6111b] retire the string constant 'any'
- [36fc47f] basic support for objective-based AI
- [d1f0a3e] improved rendering of turns and phases in the log
- [0bc31d6] better MCTS visualization
- [14a5ad7] update redux to 4.0.0
- [84f07c6] Do not fabricate playerID for playerView
- [c4a11a7] ignore events from all but currentPlayer
- [6a8b657] move mongodb and firebase deps to devDependencies
- [239f8dd] Use parse/stringify from flatted lib to support circular structures (fixes #222) (#240)
- [edd1df0] Differentiate automatic game events in the log
- [570f40e] don't render AI metadata if visualize is not specified
- [a8431c7] set default RNG seed once per game, not game type
- [5090429] API: check secret before handling the request (#231)
- [1a24791] attach events API early so that it can be used on the first onTurnBegin
- [acb9d8c] enable events API in initial onTurnBegin/onPhaseBegin
changeActionPlayers
is nowsetActionPlayers
. It also supports more advanced options.- Returning
undefined
from aTurnOrder
results in the phase ending, not settingcurrentPlayer
toany
. - Only the
currentPlayer
can call events (endTurn
,endPhase
etc.).
- [6194986] remove async/await from client code
- [7a61f09] make Random API present in first onTurnBegin and onPhaseBegin
- [f26328c] add ai.js to rollup config
- [7a80f66] make changeActionPlayers an opt-in event
- [40cd4b8] Add config update on phase change Fixes #211 (#212)
- [bb39ca7] fix bug that was causing isActive to return false
- [81ed088] ensure endTurn is called only once after a move
- [ca9f6ca] disable move if playerID is null
- [55715c9] Fix undefined ctx in onPhaseBegin
- [387d413] Debug UI CSS improvements
- [2105f46] call endTurnIf inside endPhase
- [9b0324c] allow setting the next player via endTurn
- [f76f97e] correct isMultiplayer
- [278b369] Fix bug that was ending phase incorrectly (#176)
- [dc31a66] expose allowedMoves in ctx
- [da4711a] make allowedMoves both global and phase-specific
- [9324c58] Allowed moves as function (#164)
- [5e49448] convert multiplayer move whitelist to blacklist
- [27705d5] pass Events API correctly inside events.update
- [87e77c1] correctly detach APIs from ctx in startTurn
- [2ee244e] Reset Game (#155)
- [9cd3fdf] allow to modify actionPlayers via Events (#157)
- [767362f] endGame event
- [78634ee] Events API
- [a240e45] undoableMoves implementation (#149)
- [c12e911] Process only known moves (#151)
- [7fcdbfe] Custom turn order (#130)
- [748f36f] UI: add mouse hover action props to grid, hex, and token (#153)
- [f664237] Add notion of actionPlayers (#145)
- [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
.