assassin-bug/src/engine/state.js

18 lines
307 B
JavaScript
Raw Normal View History

2021-11-04 19:58:37 +00:00
class State {
constructor() {
this.states = new Map();
}
get(key) {
2021-11-05 13:28:01 +00:00
if (!this.states.has(key)) {
return null;
}
2021-11-04 19:58:37 +00:00
return this.states.get(key);
}
set(key, value) {
return this.states.set(key, value);
}
}
export default new State();