mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-06-07 09:45:54 +02:00
21 lines
271 B
JavaScript
21 lines
271 B
JavaScript
![]() |
export class MemoryBank {
|
||
|
constructor() {
|
||
|
this.memory = {};
|
||
|
}
|
||
|
|
||
|
rememberPlace(name, x, y, z) {
|
||
|
this.memory[name] = [x, y, z];
|
||
|
}
|
||
|
|
||
|
recallPlace(name) {
|
||
|
return this.memory[name];
|
||
|
}
|
||
|
|
||
|
getJson() {
|
||
|
return this.memory
|
||
|
}
|
||
|
|
||
|
loadJson(json) {
|
||
|
this.memory = json;
|
||
|
}
|
||
|
}
|