<commit_before>import { SET_GAME_MODE } from '../../actions/actions.js';

/**
 * gameMode defines the state property gameMode
 * It describes the type of game played, either
 * mulitplayer och singleplayer
 *
 * @param  {[type]} state  [description]
 * @param  {[type]} action [description]
 * @return {[type]}        [description]
 */
export default function gameMode(state = 'single', action) {
  switch (action.type) {
    case SET_GAME_MODE:
      return action.mode;
    default:
      return state;
  }
}<commit_msg>Documentation<commit_after>import { SET_GAME_MODE } from '../../actions/actions.js';

/**
 * gameMode defines the state property gameMode
 * It describes the type of game played, either
 * mulitplayer och singleplayer
 *
 * @param  {String} state  String describing the game mode
 * @param  {Object} action Action object describing the action
 * @return {String}        String representing state
 */
export default function gameMode(state = 'single', action) {
  switch (action.type) {
    case SET_GAME_MODE:
      return action.mode;
    default:
      return state;
  }
}
{'fraction_non_alphanumeric': 0.11313868613138686, 'fraction_numerical': 0.0, 'mean_word_length': 3.477551020408163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7367004', 'n_tokens_mistral': 313, 'n_tokens_neox': 311, 'n_words': 104}