44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
import { defineStore } from "pinia";
|
|
|
|
export const useCStore = defineStore('Control Store', {
|
|
state: () => {
|
|
return {
|
|
mode: null,
|
|
user_modes: ['manually', 'BO', 'active BO'],
|
|
nr_episodes: 10,
|
|
nr_runs: 1,
|
|
greedy: 0,
|
|
sendWeights: false,
|
|
runner: false,
|
|
}
|
|
},
|
|
getters: {
|
|
getUserMode: (state) => state.mode,
|
|
getNrEpisodes: (state) => state.nr_episodes,
|
|
getNrRuns: (state) => state.nr_runs,
|
|
getGreedy: (state) => state.greedy,
|
|
getSendWeights: (state) => state.sendWeights,
|
|
getRunner: (state) => state.runner,
|
|
},
|
|
actions: {
|
|
setUserMode(value) {
|
|
this.mode = value;
|
|
},
|
|
setNrEpisodes(value) {
|
|
this.nr_episodes = value;
|
|
},
|
|
setNrRuns(value) {
|
|
this.nr_runs = value;
|
|
},
|
|
setGreedy(value) {
|
|
this.greedy = value;
|
|
},
|
|
setSendWeights() {
|
|
this.sendWeights = !this.sendWeights;
|
|
},
|
|
setRunner() {
|
|
this.runner = !this.runner;
|
|
},
|
|
}
|
|
})
|