Skip to content

Commit

Permalink
quitar impresiones por pantalla
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi2di committed May 3, 2023
1 parent 6436552 commit 8000961
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Modelo/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void setTurno(boolean pTurno) {
notifyObservers(new Object[] {pTurno});
//poner en verde

System.out.println("Ha cambiado el turno a" + pTurno);
//System.out.println("Ha cambiado el turno a" + pTurno);
if (this.turno) {
ataquedeBot();

Expand Down
2 changes: 1 addition & 1 deletion src/Modelo/Jugador.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void setTurno(boolean pTurno) {
this.turno = pTurno;
setChanged();
notifyObservers(new Object[] {pTurno});
System.out.println("Ha cambiado el turno a" + pTurno);
//System.out.println("Ha cambiado el turno a" + pTurno);
}


Expand Down
1 change: 0 additions & 1 deletion src/Modelo/ListaJugadores.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public int jugadorGanador() {
//Finalmente, elegimos un jugador al azar y le ponemos el turno a true
jug = this.buscarJugador(turno);
jug.setTurno(true);
System.out.println("El turno es de "+ jug.getId());
}
//setChanged();
//notifyObservers(new Object[] {jug});
Expand Down
8 changes: 4 additions & 4 deletions src/Modelo/Pokemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ else if(pPokemon.recibeAtaquePocoEfectivo(this.tipo)) {
/*if (this.ataquesEuforiaAcumulados>this.euforia) {
this.ataquesEuforiaAcumulados = this.euforia;
}*/
System.out.println("Id del pokemon atacante: "+ pPokemon.id);
System.out.println("Ataque del pokemon atacante: " + pPokemon.ataque);
System.out.println("Defensa del pokemon atacante: " + pPokemon.defensa);
//System.out.println("Id del pokemon atacante: "+ pPokemon.id);
//System.out.println("Ataque del pokemon atacante: " + pPokemon.ataque);
//System.out.println("Defensa del pokemon atacante: " + pPokemon.defensa);

setChanged();
notifyObservers(new int [] {this.vida,this.defensa,this.ataque,this.euforia,this.ataquesEuforiaAcumulados});
Expand Down Expand Up @@ -201,7 +201,7 @@ public boolean haAtacado () {
public void haAtacadoYa (boolean pHaAtacado) {
this.yaHaAtacado = pHaAtacado;
if (yaHaAtacado) {
System.out.println("Hola soy el pokemon: " + id + " y ya he atacado" );
//System.out.println("Hola soy el pokemon: " + id + " y ya he atacado" );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Modelo/PokemonFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Pokemon create(int i) {
int r = (int)(Math.random()*8);
String nombre = new String[] {"Agua", "Fuego", "Planta", "Electrico", "Bicho", "Volador", "Psiquico", "Roca"}[r]; //tipo aleatorio
Pokemon pokeAct = null;
System.out.println("El tipo de Pokemon es: " + nombre);
//System.out.println("El tipo de Pokemon es: " + nombre);
if (nombre == "Agua") {pokeAct = new Agua(i);}
else if (nombre == "Fuego") {pokeAct = new Fuego(i);}
else if (nombre == "Planta") {pokeAct = new Planta(i);}
Expand Down
6 changes: 3 additions & 3 deletions src/Vista_Controlador/Panel_Pokemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ private class Controler implements MouseListener {
public void mouseClicked(MouseEvent e) {
//if(e.getSource().equals(this)) {
CampoDeBatalla.getCampoBatalla().sePuedeAtacar(idPok, idJug);
System.out.println(" Se ha clickado el pokemon" + idPok + "del jugador" + idJug);
//System.out.println(" Se ha clickado el pokemon" + idPok + "del jugador" + idJug);
//ListaJugadores.getListaJugadores().buscarJugador(idJug).getPokemon(idPok).haAtacadoEuforico();
cont++;
System.out.println("El valor de cont es" + cont);
//System.out.println("El valor de cont es" + cont);
if (cont==1 && idJug!=1) /*El bot lo gestiona de otra manera*/{
System.out.println("Entra en el if vista 1 y el id del jugador atacante es: " + idJug + " y el id del pokemon atacante es: " + idPok);
//System.out.println("Entra en el if vista 1 y el id del jugador atacante es: " + idJug + " y el id del pokemon atacante es: " + idPok);
ListaJugadores.getListaJugadores().buscarJugador(idJug).getPokemon(idPok).estaEuforico();
}
else if (cont==2) {
Expand Down
3 changes: 0 additions & 3 deletions src/Vista_Controlador/Vista_Jugador.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,9 @@ private JButton getButton_Jugador_estado(boolean turno) {
if (btn_Jugador_estado == null) {
if (turno == false) {
btn_Jugador_estado = new JButton("Espera");
System.out.println("Me toca esperar");
}
else
{btn_Jugador_estado = new JButton("Ataca");
System.out.println("Me toca atacar");
}
btn_Jugador_estado.setBorderPainted( false );
btn_Jugador_estado.addActionListener(getControler());
Expand Down Expand Up @@ -183,7 +181,6 @@ public void update(Observable o, Object arg) { /*Este panel es solo para los jug
boolean perdido = (boolean)arrayBool[0];
if(!perdido) {
btn_Jugador_estado.setText("Ha Ganado");
System.out.println("HA GANADO JUGADOR "+idJug);
Panel_Jugador_Estado.setBackground(Color.YELLOW);
}
if (perdido) {
Expand Down

0 comments on commit 8000961

Please sign in to comment.