Skip to content

Instantly share code, notes, and snippets.

@ramonvictor
Last active April 28, 2016 11:43
Show Gist options
  • Save ramonvictor/a293e3bb1462a259ef93623beca86bad to your computer and use it in GitHub Desktop.
Save ramonvictor/a293e3bb1462a259ef93623beca86bad to your computer and use it in GitHub Desktop.
function Store() {
this.state = {};
this.state = this.update(this.state, {});
// `this.update()` will return the initial state:
// ----------------------------------------------
// {
// grid: ['', '', '', '', '', '', '', '', ''],
// turn: 'x',
// score: { x: 0, o: 0 },
// winnerSequence: [],
// turnCounter: 0,
// player: ''
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment