Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resetGame() {
this.logged = false;
this.activeUsers = new UserCollection();
// this.unregisterPhysicsEvents()
this.chips = {};
this.pegs = [];
Engine.clear(this.engine);
delete this.engine;
delete this.gameloop;
this.frame = 0;
this.inputBuffer = new InputBuffer();
this.winner = false;
this.initializeScore();
}
bodies = bodies.concat([
selectTopBun(this.props.burger),
...selectPatty(this.props.burger),
bottomBun
]);
}
} else {
if (this.props.burger.bun) {
bodies = bodies.concat([selectTopBun(this.props.burger), bottomBun]);
}
}
}
Render.stop(this.matterRender);
World.clear(this.matterEngine.world);
Engine.clear(this.matterEngine);
World.add(this.matterEngine.world, bodies);
Engine.run(this.matterEngine);
Render.run(this.matterRender);
};
render() {