constructor() {
this.status = StatusGameManagerEnum.IN_PROGRESS;
- ConnexionInstance = new Connexion("test@gmail.com", this);
+ this.configureGame();
}
-
+
- createGame(){
- return ConnexionInstance.createConnexion().then(() => {
- this.configureGame();
- /** TODO add loader in the page **/
- //initialise Pear Connexion of game
- this.SimplePeer = new SimplePeer(ConnexionInstance);
- }).catch((err) => {
- console.error(err);
- throw err;
- });
+ connect(email:string) {
- this.ConnexionInstance = new Connexion(email, this);
- return this.ConnexionInstance.createConnexion()
++ ConnexionInstance = new Connexion(email, this);
++ this.SimplePeer = new SimplePeer(ConnexionInstance);
}
/**