From 24e620c8c69ca8aa2994bed28d13471191d52b63 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Tue, 27 Jan 2015 18:50:32 +0100 Subject: [PATCH] An object isn't a person. --- src/Objets/ObjetAbstrait.java | 86 ++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 12 deletions(-) diff --git a/src/Objets/ObjetAbstrait.java b/src/Objets/ObjetAbstrait.java index c8a40ce..2429102 100644 --- a/src/Objets/ObjetAbstrait.java +++ b/src/Objets/ObjetAbstrait.java @@ -3,17 +3,79 @@ package Objets; import Cases.CaseAbstraite; import Person.Personnage; -public abstract class ObjetAbstrait extends Personnage { - - Personnage perso; - CaseAbstraite positionCourante; - String nom; - - protected ObjetAbstrait(String name, double lifePoint, double strength, - double speed) { - super(name, lifePoint, strength, speed); - // TODO Auto-generated constructor stub +public abstract class ObjetAbstrait { + protected CaseAbstraite caseCourante; + protected Personnage perso; + protected String nom; + protected double pointsDeVie; + protected double force; + protected double vitesse; + + protected ObjetAbstrait(String name) { + this.nom = name; + this.pointsDeVie = 100; + this.force = 10; + this.vitesse = 1; + + this.perso = null; + this.caseCourante = null; + } + + protected ObjetAbstrait(String name, double lifePoint, double strength, double speed) { + this.nom = name; + this.pointsDeVie=lifePoint; + this.force=strength; + this.vitesse=speed; + + this.caseCourante=null; + this.perso = null; + } + + public CaseAbstraite getCaseCourante() { + return caseCourante; + } + + public void setCaseCourante(CaseAbstraite caseCourante) { + this.caseCourante = caseCourante; + } + + public String getNom() { + return nom; + } + + public void setNom(String nom) { + this.nom = nom; + } + + public double getPointsDeVie() { + return pointsDeVie; + } + + public void setPointsDeVie(double pointsDeVie) { + this.pointsDeVie = pointsDeVie; + } + + public double getForce() { + return force; + } + + public void setForce(double force) { + this.force = force; + } + + public double getVitesse() { + return vitesse; + } + + public void setVitesse(double vitesse) { + this.vitesse = vitesse; + } + + public Personnage getPerso() { + return perso; + } + + public void setPerso(Personnage perso) { + this.perso = perso; } - - }