Commit 0f32af84 authored by Mamadou Diallo's avatar Mamadou Diallo
Browse files

Ajout du modéle

parent bd014933
package fr.univnantes.alma.model.cards; package fr.univnantes.alma.model.cards;
public abstract class Card { public class Card {
private Object title; private Object title;
private Phase phase; private Phase phase;
private String description; private String description;
......
package fr.univnantes.alma.model.players; package fr.univnantes.alma.model.players;
public class Creature extends Player{ public class Creature extends Player{
public Creature(String name) { public Creature(String name) {
...@@ -7,6 +9,5 @@ public class Creature extends Player{ ...@@ -7,6 +9,5 @@ public class Creature extends Player{
} }
public void toTraque(Tracked tracked){ public void toTraque(Tracked tracked){
} }
} }
...@@ -22,7 +22,6 @@ public abstract class Player { ...@@ -22,7 +22,6 @@ public abstract class Player {
} }
public UUID generateId(){ public UUID generateId(){
UUID uniqID = UUID.randomUUID(); UUID uniqID = UUID.randomUUID();
return uniqID; return uniqID;
...@@ -32,10 +31,6 @@ public abstract class Player { ...@@ -32,10 +31,6 @@ public abstract class Player {
} }
public void play(){
}
public List<Card> getHand() { public List<Card> getHand() {
return hand; return hand;
} }
...@@ -55,4 +50,17 @@ public abstract class Player { ...@@ -55,4 +50,17 @@ public abstract class Player {
public UUID getId() { public UUID getId() {
return id; return id;
} }
// Piocher
public void draw(int nbOfCards){
if(this.discard.size()<nbOfCards){
System.err.println("il n'y a pas assez de cartes, veuillez diminuer le nombre");
}else {
for(int i = 0; i<nbOfCards; i++){
Card card = this.discard.get(i);
this.hand.add(card);
this.discard.remove(card);
}
}
}
} }
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