()
| 185 | this.functions.restart(); |
| 186 | } |
| 187 | getState() { |
| 188 | const state = this.functions.saveStateInfo().split("|"); |
| 189 | if (state[2] !== "1") { |
| 190 | console.error(state[0]); |
| 191 | throw new Error(state[0]); |
| 192 | } |
| 193 | const size = parseInt(state[0]); |
| 194 | const dataStart = parseInt(state[1]); |
| 195 | const data = this.Module.HEAPU8.subarray(dataStart, dataStart + size); |
| 196 | return new Uint8Array(data); |
| 197 | } |
| 198 | loadState(state) { |
| 199 | try { |
| 200 | this.FS.unlink("game.state"); |
no outgoing calls
no test coverage detected