working vue components for 1D automata

This commit is contained in:
2022-01-10 11:13:44 +01:00
parent 890018c0dc
commit 4f26becf9f
7 changed files with 123 additions and 123 deletions

View File

@ -5,9 +5,19 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
rules1d : {},
drawing: 0,
rules1d : {
"111" : 0,
"110" : 1,
"101" : 0,
"100" : 0,
"011" : 1,
"010" : 0,
"001" : 0,
"000" : 1
},
cellProperties: {
size: 5,
size: 3,
liveColor: '#000000',
deadColor: '#AA78E8',
},
@ -20,6 +30,17 @@ export default new Vuex.Store({
state.cellProperties[data.name] = data.value
},
},
getters: {
getCellProperties(state) {
return state.cellProperties
},
getRuleSet1d(state) {
return state.rules1d
},
getRule1d(state) {
return (rule) => state.rules1d[rule]
}
},
actions: {
},
modules: {