Skip to content

Instantly share code, notes, and snippets.

@dapperAuteur
Created October 25, 2016 03:55
Show Gist options
  • Save dapperAuteur/381b0d00245c2e7a696766dce1d90be1 to your computer and use it in GitHub Desktop.
Save dapperAuteur/381b0d00245c2e7a696766dce1d90be1 to your computer and use it in GitHub Desktop.
import { fromJS, List } from 'immutable';
export const newGame = () => {
let awayTeam = 0;
let homeTeam = 0;
let balls = 0;
let strikes = 0;
let fouls = 0;
let outs = 0;
let inning = 1;
const game = [];
game.push({'awayTeam': 0, 'homeTeam': 0, 'balls': 0, 'strikes': 0, 'fouls': 0, 'outs': 0, 'inning': 1});
return fromJS(game);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment