option : last generated 2d board as initial state

This commit is contained in:
2022-01-13 23:13:22 +01:00
parent 032dae7b34
commit ae237b8c61
3 changed files with 48 additions and 12 deletions

View File

@ -26,7 +26,8 @@ export default new Vuex.Store({
refreshRate: 300,
initial1dState: "onecell",
activeMenu: "Elementary Cellular Automata",
drawingDirection: "y"
drawingDirection: "y",
lastBoard: {}
},
mutations: {
update1dSingleRule(state, data) {
@ -59,6 +60,9 @@ export default new Vuex.Store({
setDrawingDirection(state, data) {
state.drawingDirection = data
},
setLastBoard(state, data) {
state.lastBoard = data
},
},
getters: {
getCellProperties(state) {
@ -90,6 +94,9 @@ export default new Vuex.Store({
},
getDrawingDirection(state) {
return state.drawingDirection
},
getLastBoard(state) {
return state.lastBoard
}
},
actions: {