Plateau test
This commit is contained in:
@ -50,6 +50,11 @@ public class CarteLieu extends CarteEffet{
|
||||
this.voisin = cl;
|
||||
}
|
||||
|
||||
public Point getCoordinates() {
|
||||
return this.coordinates;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class Joueur {
|
||||
if(blessure > 0)
|
||||
{
|
||||
j2.addStat(PLAYER_HP, -blessure);
|
||||
this.cartePersonnage.attaquer(j2);
|
||||
//this.cartePersonnage.attaquer(j2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,12 +72,15 @@ public class Plateau {
|
||||
|
||||
public void deplacer(Joueur currentJoueur) {
|
||||
|
||||
int roll = sumRolls();
|
||||
|
||||
boolean attributed = false;
|
||||
|
||||
while(!attributed) {
|
||||
int roll = sumRolls();
|
||||
for(CarteLieu cl : lieux) {
|
||||
|
||||
if(cl.coordinatesContains(roll) && currentJoueur.getCarteLieu() != cl){
|
||||
|
||||
currentJoueur.deplacer(cl);
|
||||
attributed = true;
|
||||
break;
|
||||
|
@ -13,7 +13,7 @@ public class Charles extends CartePersonnage{
|
||||
public Charles(String nom, int hp, Joueur joueur) {
|
||||
super(nom, nom, hp, joueur);
|
||||
|
||||
Action action = new ActionAltererStatistiquesJoueur("HP",2,true);
|
||||
Action action = new ActionAltererStatistiquesJoueur("HP",-2,true);
|
||||
Effet effet = new EffetSelf(action);
|
||||
this.setEffet(effet);
|
||||
|
||||
@ -31,7 +31,6 @@ public class Charles extends CartePersonnage{
|
||||
|
||||
@Override
|
||||
public void utiliser() {
|
||||
// TODO Auto-generated method stub
|
||||
this.getEffet().utiliser(this.getJoueur());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user