Plateau test

This commit is contained in:
Paul Gross
2020-04-21 16:02:01 +02:00
parent e53ab04aaf
commit 307b6f7143
6 changed files with 50 additions and 7 deletions

View File

@ -50,6 +50,11 @@ public class CarteLieu extends CarteEffet{
this.voisin = cl;
}
public Point getCoordinates() {
return this.coordinates;
}
}

View File

@ -109,7 +109,7 @@ public class Joueur {
if(blessure > 0)
{
j2.addStat(PLAYER_HP, -blessure);
this.cartePersonnage.attaquer(j2);
//this.cartePersonnage.attaquer(j2);
}
}

View File

@ -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;

View File

@ -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());
}
}