Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// FUNCION JUGADOR
- /// SU FUNCIONES ES CLASiFICAR POR UN OBJETO LLAMADO JUGADOR CON 4 PROPIEDADES LAS CUALES ES SU INFORMACION.
- var JUGADOR = /** @class */ (function () {
- function JUGADOR(n, r, e, a) {
- this.nombre = n;
- this.rol = r;
- this.edad = e;
- this.sexo= a;
- }
- JUGADOR.prototype.mostrarInfo = function () {
- document.write(" <br> - El jugador " + this.nombre + " de rol: " + this.rol + " y tiene edad " + this.edad + "<br>");
- };
- JUGADOR.prototype.ATACAR = function (AT, J) {
- document.write(" <br> - El jugador " + this.nombre + " atacara " + AT + " veces a jugador: " + J + "<br>");
- };
- JUGADOR.prototype.dormir = function (nm) {
- document.write("<br> - JUGADOR " + this.nombre + " duerme " + nm + " minutos " + "<br>");
- };
- JUGADOR.prototype.ESCONDETE = function (EC, min) {
- document.write(" <br> - JUGADOR " + this.nombre + " se escondio en : " + EC + " x "+ min +" minutos " + "<br>");
- };
- return JUGADOR;
- }());
- /// CLASE TITULOS
- class TITLES{
- constructor(C) {
- this.color_piel = C;
- }
- mostrar() {
- document.write("<br><br>" + this.color_piel + "<br><br>");
- }
- }
- var p1, p2, p3, T1, T2, T3;
- T1 = new TITLES("[ INFORMACION JUGADORES ]");
- T2 = new TITLES("[ HISTORIAL DE JUGADAS ]");
- T3 = new TITLES("[ SKIN DE JUGADORES ]")
- p1 = new JUGADOR("SANCHEZ","CIVIL", 12, "H");
- p2 = new JUGADOR("CHILY", "TRAFICANTE", 11, "M");
- p3 = new JUGADOR("MANUEL", "CIVIL", 10, "MTF" );
- p4 = new JUGADOR("JAVI", "REY", 15, "M" );
- T1.mostrar();
- p1.mostrarInfo();
- p2.mostrarInfo();
- p3.mostrarInfo();
- p4.mostrarInfo();
- T2.mostrar();
- p1.ATACAR(9,"CHILY");
- p2.dormir(90);
- p1.dormir(200);
- p3.ATACAR(3,"SANCHEZ");
- p1.ESCONDETE("un arbol",5);
- p4.dormir(1000)
- p4.ESCONDETE("en su camuflaje",9);
- p5.ATACAR(9,"CHILY");
Advertisement
Add Comment
Please, Sign In to add comment