Commit bd5ac760 authored by Antoine Guérin's avatar Antoine Guérin
Browse files

Implementation de les cartes à jouer

parent 1e97cdc7
package fr.univnantes.alma.game.composant.Carte;
public class Carte {
import java.util.Objects;
public abstract class Carte {
private String nom;
private String pouvoir;
public Carte(String nom, String pouvoir){
this.nom = nom;
this.pouvoir = pouvoir;
}
public String getNom() {
return nom;
}
public String getPouvoir() {
return pouvoir;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Carte carte = (Carte) o;
return Objects.equals(nom, carte.nom) &&
Objects.equals(pouvoir, carte.pouvoir);
}
}
package fr.univnantes.alma.game.composant.Carte;
public class CarteLieu {
public class CarteLieu extends Carte{
private int numero;
public CarteLieu(String nom, String pouvoir, int numero){
super(nom, pouvoir);
this.numero = numero;
}
public int getNumero() {
return numero;
}
}
package fr.univnantes.alma.game.composant.Carte;
public class CarteSurvie {
public class CarteSurvie extends Carte{
private int phase;
private String symbole;
public CarteSurvie(String nom, String pouvoir, int phase, String symbole) {
super(nom, pouvoir);
this.phase = phase;
this.symbole = symbole;
}
public int getPhase() {
return phase;
}
public String getSymbole() {
return symbole;
}
}
package fr.univnantes.alma.game.composant.Carte;
import fr.univnantes.alma.game.composant.Jeton.Jeton;
public class CarteTraque {
public class CarteTraque extends Carte{
private int phase;
private Jeton symbole;
public CarteTraque(String nom, String pouvoir, int phase, Jeton symbole) {
super(nom, pouvoir);
this.phase = phase;
this.symbole = symbole;
}
public int getPhase() {
return phase;
}
public Jeton getSymbole() {
return symbole;
}
}
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