Created
August 7, 2019 03:57
-
-
Save parzibyte/2f224fcbe9c48e2b6d8344cd4e30941c to your computer and use it in GitHub Desktop.
Revisions
-
parzibyte created this gist
Aug 7, 2019 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ // Método que muestra la alerta indicando que el jugador ha perdido; después // de mostrarla, se reinicia el juego indicarFracaso() { Swal.fire({ title: "Perdiste", html: ` <img class="img-fluid" src="./img/perdiste.png" alt="Perdiste"> <p class="h4">Agotaste tus intentos</p>`, confirmButtonText: "Jugar de nuevo", allowOutsideClick: false, allowEscapeKey: false, }) .then(this.reiniciarJuego) }, // Mostrar alerta de victoria y reiniciar juego indicarVictoria() { Swal.fire({ title: "¡Ganaste!", html: ` <img class="img-fluid" src="./img/ganaste.png" alt="Ganaste"> <p class="h4">Muy bien hecho</p>`, confirmButtonText: "Jugar de nuevo", allowOutsideClick: false, allowEscapeKey: false, }) .then(this.reiniciarJuego) },