Skip to content
Snippets Groups Projects
Commit 61d45b9e authored by tompotio's avatar tompotio
Browse files

V6

parent 4dc5164b
Branches
Tags
No related merge requests found
package DP.Fabrique;
import Personnage.Personnage;
public interface FabriquePersonnage {
Personnage creerPersonnage(String nom);
}
package Fabrique;
import DP.Fabrique.FabriquePersonnage;
import Personnage.*;
public class FabriqueGuerisseur implements FabriquePersonnage {
/**
* Crée un nouveau personnage avec des statistiques de base.
* @param nom
* @return
*/
@Override
public Personnage creerPersonnage(String nom) {
return new Guerisseur(nom,20);
}
}
package Fabrique;
import DP.Fabrique.FabriquePersonnage;
import Personnage.*;
public class FabriqueGuerrier implements FabriquePersonnage {
@Override
public Personnage creerPersonnage(String nom) {
return new Guerrier(nom,35);
}
}
package Fabrique;
import DP.Fabrique.FabriquePersonnage;
import Personnage.*;
public class FabriqueRoi implements FabriquePersonnage {
@Override
public Personnage creerPersonnage(String nom) {
return new Roi(nom, 40);
}
}
package Fabrique;
import DP.Fabrique.FabriquePersonnage;
import Personnage.*;
public class FabriqueSorcier implements FabriquePersonnage {
@Override
public Personnage creerPersonnage(String nom) {
return new Sorcier(nom, 20);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment