|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
package modeles;
|
|
|
|
package modeles;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
@ -20,7 +19,8 @@ public class Personnage extends EtreVivant {
|
|
|
|
arme.setProprietaire(this);
|
|
|
|
arme.setProprietaire(this);
|
|
|
|
this.arme=arme;
|
|
|
|
this.arme=arme;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void equiper(Armure armure) {
|
|
|
|
|
|
|
|
|
|
|
|
public void equiper(Armure armure) {
|
|
|
|
armure.setProprietaire(this);
|
|
|
|
armure.setProprietaire(this);
|
|
|
|
this.armure=armure;
|
|
|
|
this.armure=armure;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -65,6 +65,13 @@ public void equiper(Armure armure) {
|
|
|
|
return this.bourse;
|
|
|
|
return this.bourse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param bourse the bourse to set
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public void setBourse(Bourse bourse) {
|
|
|
|
|
|
|
|
this.bourse = bourse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getValeurBourse() {
|
|
|
|
public int getValeurBourse() {
|
|
|
|
return this.getBourse().getValeur();
|
|
|
|
return this.getBourse().getValeur();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -78,7 +85,7 @@ public void equiper(Armure armure) {
|
|
|
|
public String obtenirBourse() {
|
|
|
|
public String obtenirBourse() {
|
|
|
|
Random rd = new Random();
|
|
|
|
Random rd = new Random();
|
|
|
|
this.bourse.fusionBourse(new Bourse(rd.nextInt(20)));
|
|
|
|
this.bourse.fusionBourse(new Bourse(rd.nextInt(20)));
|
|
|
|
String str="Vous avez gagnez une bourse. Vous comptez vos pièces... Genial !! Vous avez désormais ".concat(String.valueOf(this.getValeurBourse()).concat(" pièces d'argent !"));
|
|
|
|
String str="Vous avez gagnez une bourse. Vous comptez vos pi<EFBFBD>ces... Genial !! Vous avez d<>sormais ".concat(String.valueOf(this.getValeurBourse()).concat(" pi<EFBFBD>ces d'argent !"));
|
|
|
|
return str;
|
|
|
|
return str;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|