kopia lustrzana https://github.com/rastapasta/mapscii
Use async to simplify Mapscii.init()
rodzic
cdb0f45c75
commit
926a6d0bcc
|
@ -43,8 +43,7 @@ class Mapscii {
|
|||
config = Object.assign(config, options);
|
||||
}
|
||||
|
||||
init() {
|
||||
return new Promise((resolve) => {
|
||||
async init() {
|
||||
if (!config.headless) {
|
||||
this._initKeyboard();
|
||||
this._initMouse();
|
||||
|
@ -53,8 +52,6 @@ class Mapscii {
|
|||
this._initRenderer();
|
||||
this._draw();
|
||||
this.notify('Welcome to MapSCII! Use your cursors to navigate, a/z to zoom, q to quit.');
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue