Skip to content

Commit

Permalink
docs(secret-state): Fix obsolete reference to importing Game
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Aug 28, 2020
1 parent 2586022 commit 4759da3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions docs/documentation/secret-state.md
Expand Up @@ -17,11 +17,10 @@ from that specific player.

```js
const game = {
...

// ...
playerView: (G, ctx, playerID) => {
return StripSecrets(G, playerID);
}
},
};
```

Expand All @@ -37,7 +36,7 @@ that does the following:
- If `G` contains a `players` object, it removes all keys except
for the one that matches `playerID`.

```
```js
G: {
secret: { ... },

Expand All @@ -51,7 +50,7 @@ G: {

becomes the following for player `1`:

```
```js
G: {
players: {
'1': { ... },
Expand All @@ -62,12 +61,12 @@ G: {
Usage:

```js
import { Game, PlayerView } from 'boardgame.io/core';
import { PlayerView } from 'boardgame.io/core';

const App = Game({
...
playerView: PlayerView.STRIP_SECRETS
});
const game = {
// ...
playerView: PlayerView.STRIP_SECRETS,
};
```

### Disabling moves that manipulate secret state on the client
Expand Down

0 comments on commit 4759da3

Please sign in to comment.