Commit 7c000e03 authored by Anthony ROZEN's avatar Anthony ROZEN

avancement implémentation

parent 8644b025
......@@ -53,21 +53,19 @@ public class ServeurNotAlone implements ServeurNotAloneInterface {
}
public CarteTraque piocherCarteTraque() {
/*Random random = new Random();
int rand = random.nextInt(plateau.getPiocheCarteTraque().size());
CarteTraque carte = plateau.getPiocheCarteTraque().get(rand);
plateau.getPiocheCarteTraque().remove(rand);
return carte;*/
return null;
Random random = new Random();
int rand = random.nextInt(plateau.getPiocheTraque().size());
CarteTraque carte = plateau.getPiocheTraque().get(rand);
plateau.getPiocheTraque().remove(rand);
return carte;
}
public CarteSurvie piocherCarteSurvie() {
/*Random random = new Random();
int rand = random.nextInt(plateau.getPiocheCarteSurvie().size());
CarteTraque carte = plateau.getPiocheCarteSurvie().get(rand);
plateau.getPiocheCarteSurvie().remove(rand);
return carte;*/
return null;
Random random = new Random();
int rand = random.nextInt(plateau.getPiocheSurvie().size());
CarteSurvie carte = plateau.getPiocheSurvie().get(rand);
plateau.getPiocheSurvie().remove(rand);
return carte;
}
public void lacherPrise(Traque player){
......@@ -271,17 +269,17 @@ public class ServeurNotAlone implements ServeurNotAloneInterface {
// si le traque explore un lieu ou se trouve le jeton cible
// si le traque explore un lieu ou se trouve le jeton artemia
/*for (int i=0; i <= carteJouer.size(); i++){
for (int i=0; i <= carteJouer.size(); i++){
if (creature.getJetonCreature().getPosition().contains(carteJouer.get(i))){
}else if(creature.getJetonCible().getPosition().contains(carteJouer.get(i))){
}else if (creature.getJetonCreature().getPosition().contains(carteJouer.get(i))){
}else if (creature.getJetonArtemia().getPosition().contains(carteJouer.get(i))){
}else{
}
}*/
}
}
public void phase4(){
......
......@@ -9,7 +9,7 @@ import java.util.ArrayList;
public class Creature extends Joueur{
private Jeton jetonCreature;
private Jeton jetonCible; // peut etre changer parce revoir implementation jeton
private Jeton jetonCible;
private Jeton jetonArtemia;
private ArrayList<CarteTraque> carteTraque;
......@@ -17,11 +17,34 @@ public class Creature extends Joueur{
super(nom);
jetonCreature = new Jeton(SymboleJeton.CREATURE);
jetonCible = new Jeton(SymboleJeton.CIBLE);
jetonArtemia = new Jeton(SymboleJeton.ARTEMIA
);
jetonArtemia = new Jeton(SymboleJeton.ARTEMIA);
this.carteTraque = new ArrayList<CarteTraque>(); // taille 3
}
public Jeton getJetonCreature() {
return jetonCreature;
}
public void setJetonCreature(Jeton jetonCreature) {
this.jetonCreature = jetonCreature;
}
public Jeton getJetonCible() {
return jetonCible;
}
public void setJetonCible(Jeton jetonCible) {
this.jetonCible = jetonCible;
}
public Jeton getJetonArtemia() {
return jetonArtemia;
}
public void setJetonArtemia(Jeton jetonArtemia) {
this.jetonArtemia = jetonArtemia;
}
public ArrayList<CarteTraque> getCarteTraque() {
return carteTraque;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment