+ };
+ if (!!game)
+ return afterRetrival(game);
+ if (!!this.gameRef.rid)
+ {
+ // TODO: just send a game request message to the remote player,
+ // and when receiving answer just call loadGame(received_game)
+ // + remote peer should have registered us as an observer
+ // (send moves updates + resign/abort/draw actions)
+ return;
+ }
+ else
+ {
+ GameStorage.get(this.gameRef.id, async (game) => {
+ afterRetrieval(game);
+ });
+ }