<commit_before>import Vue from 'vue'
import Vuex from 'vuex'
import * as api from './api'

Vue.use(Vuex)

const shipSizes = {
  carrier: 5,
  battleship: 4,
  cruiser: 3,
  submarine: 3,
  destroyer: 2,
}

export default new Vuex.Store({
  state: {
    player: {
      ID: undefined,
      nickname: 'anonymous',
      ships: {
        carrier: {},
        battleship: {},
        cruiser: {},
        submarine: {},
        destroyer: {},
      },
      bombs: [],
    },
    opponent: {
      nickname: 'anonymous',
      grid: [],
    },
    game: {
      ID: undefined,
    },
  },
  mutations: {
    setGameID(state, ID) {
      Vue.set(state.game, 'ID', ID)
    },
    setPlayerID(state, ID) {
      Vue.set(state.player, 'ID', ID)
    },
    setPlayerNickname(state, nickname) {
      if (nickname === '') {
        Vue.set(state.player, 'nickname', 'Anonymous')
      } else {
        Vue.set(state.player, 'nickname', nickname)
      }
    },
    setOpponentNickname(state, nickname) {
      if (nickname === '') {
        Vue.set(state.opponent, 'nickname', 'Anonymous')<commit_msg>Fix inconsistency in default nickname<commit_after>import Vue from 'vue'
import Vuex from 'vuex'
import * as api from './api'

Vue.use(Vuex)

const shipSizes = {
  carrier: 5,
  battleship: 4,
  cruiser: 3,
  submarine: 3,
  destroyer: 2,
}

export default new Vuex.Store({
  state: {
    player: {
      ID: undefined,
      nickname: 'Anonymous',
      ships: {
        carrier: {},
        battleship: {},
        cruiser: {},
        submarine: {},
        destroyer: {},
      },
      bombs: [],
    },
    opponent: {
      nickname: 'Anonymous',
      grid: [],
    },
    game: {
      ID: undefined,
    },
  },
  mutations: {
    setGameID(state, ID) {
      Vue.set(state.game, 'ID', ID)
    },
    setPlayerID(state, ID) {
      Vue.set(state.player, 'ID', ID)
    },
    setPlayerNickname(state, nickname) {
      if (nickname === '') {
        Vue.set(state.player, 'nickname', 'Anonymous')
      } else {
        Vue.set(state.player, 'nickname', nickname)
      }
    },
    setOpponentNickname(state, nickname) {
      if (nickname === '') {
        Vue.set(state.opponent, 'nickname', 'Anonymous')
{'fraction_non_alphanumeric': 0.161231884057971, 'fraction_numerical': 0.004528985507246377, 'mean_word_length': 2.1422475106685632, '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': '5356479', 'n_tokens_mistral': 800, 'n_tokens_neox': 786, 'n_words': 161}