Skip to content
Snippets Groups Projects
Commit 8a921986 authored by rosier8u's avatar rosier8u
Browse files

V0

parent 4ab2064e
No related branches found
No related tags found
No related merge requests found
public class Guerisseur extends Personnage{
private int sagesse;
public Guerisseur(int pointsDeVie, int niveau, String nom, int sagesse) {
super(pointsDeVie, niveau, nom);
public Guerisseur(int pointsDeVie, int niveau, String nom, Arme arme, int sagesse) {
super(pointsDeVie, niveau, nom, arme);
this.sagesse = sagesse;
}
......
public class Guerrier extends Personnage{
private int force;
public Guerrier(int pointsDeVie, int niveau, String nom, int force) {
super(pointsDeVie, niveau, nom);
public Guerrier(int pointsDeVie, int niveau, String nom, Arme arme, int force) {
super(pointsDeVie, niveau, nom,arme);
this.force = force;
}
......
......@@ -2,11 +2,13 @@ public abstract class Personnage {
protected int pointsDeVie;
protected int niveau;
protected String nom;
protected Arme arme;
public Personnage(int pointsDeVie, int niveau, String nom){
public Personnage(int pointsDeVie, int niveau, String nom, Arme arme){
this.pointsDeVie = pointsDeVie;
this.niveau = niveau;
this.nom = nom;
this.arme = arme;
}
public void setNom(String nom) {
......@@ -32,4 +34,12 @@ public abstract class Personnage {
public int getPointsDeVie() {
return pointsDeVie;
}
public void setArme(Arme arme) {
this.arme = arme;
}
public Arme getArme() {
return arme;
}
}
......@@ -2,8 +2,8 @@ public class Roi extends Personnage{
private int force;
private String royaume;
public Roi(int pointsDeVie, int niveau, String nom, int force, String royaume){
super(pointsDeVie,niveau,nom);
public Roi(int pointsDeVie, int niveau, String nom, Arme arme, int force, String royaume) {
super(pointsDeVie, niveau, nom, arme);
this.force = force;
this.royaume = royaume;
}
......
public class Sorcier extends Personnage{
private int intelligence;
public Sorcier(int pointsDeVie, int niveau, String nom, int intelligence) {
super(pointsDeVie, niveau, nom);
public Sorcier(int pointsDeVie, int niveau, String nom, Arme arme, int intelligence) {
super(pointsDeVie, niveau, nom, arme);
this.intelligence = intelligence;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment