init repo

This commit is contained in:
2023-10-29 21:25:36 +01:00
commit 1dd04b7216
29 changed files with 10556 additions and 0 deletions

10
store/README.md Normal file
View File

@@ -0,0 +1,10 @@
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).

24
store/index.js Normal file
View File

@@ -0,0 +1,24 @@
export const state = () => ({
gameSettings: {
playerCount: 0,
turnCount: 0,
iterationCount: 0,
},
gameStarted: false,
});
export const mutations = {
SET_GAME_SETTINGS(state, settings) {
state.gameSettings = settings;
},
SET_GAME_STARTED(state, value) {
state.gameStarted = value;
}
};
export const actions = {
initializeGame({ commit }, settings) {
commit('SET_GAME_SETTINGS', settings);
commit('SET_GAME_STARTED', true);
}
};