Skip to content

Commit

Permalink
Instantiate from ArcadeUI
Browse files Browse the repository at this point in the history
  • Loading branch information
tomczoink committed Oct 19, 2023
1 parent be559aa commit a73b630
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/ArcadeUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class ArcadeUI {

public bind(runner: GameRunner): void {
this.contestHandler.runner = runner;
this.contestHandler.instantiateMap();

if (this.eventListenerController) {
this.eventListenerController.abort();
Expand Down
3 changes: 1 addition & 2 deletions app/arcade-ui-helpers/ArcadeContestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class ArcadeContestHandler {
});

this.getGlobalHistory();
this.instantiateMap();
}

public async startContest() {
Expand Down Expand Up @@ -115,7 +114,7 @@ export class ArcadeContestHandler {
await this.messages.display("Game over!", 5000);
}

private async instantiateMap() {
public async instantiateMap() {
const history = await this.channel.history();
const historyMessage = history.items[0];
const previousStateData = historyMessage?.data || [];
Expand Down

0 comments on commit a73b630

Please sign in to comment.