From 31a9c686803797e875cd5c4b066c1496c9fb2b06 Mon Sep 17 00:00:00 2001 From: guervild Date: Tue, 14 Apr 2015 16:12:26 +0200 Subject: [PATCH] Update and rename Robots.java to Robot.java --- Robot.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ Robots.java | 50 -------------------------------------------------- 2 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 Robot.java delete mode 100644 Robots.java diff --git a/Robot.java b/Robot.java new file mode 100644 index 0000000..b33b29b --- /dev/null +++ b/Robot.java @@ -0,0 +1,51 @@ +public abstract class Robot { + + private int equipe; + private int energie; + Vue vue; + Coordonne c; + + public Robot(int equipe, int energie) { + this.energie = energie; + this.equipe = equipe; + } + + public void setCoordonne(Coordonne coordonne) { + this.c = coordonne; + } + + public Coordonne getCoordonne() { + return this.c; + } + + public abstract boolean estSurBase(); + + public void setEnergie(int energie) { + this.energie = energie; + } + + public int getEnergie() { + return this.energie; + } + + public int getEquipe() { + return this.equipe; + } + + public abstract int getRegenEnergie(); + + public abstract int getCoutDeplacement(); + + public abstract int getCoutTir(); + + public abstract int getDegatTir(); + + public abstract int getDegatMine(); + + public abstract int getPortee(); + + // public abstract int getCoutMine(); + + public abstract String getType(); + +} diff --git a/Robots.java b/Robots.java deleted file mode 100644 index d7ac42b..0000000 --- a/Robots.java +++ /dev/null @@ -1,50 +0,0 @@ - - -public class Robots { - protected String affichage; - protected int portee, deplacement, energie, regeneration, degat, coutAttaque, coutDeplacement; - - public Robots (String affich, int po, int dep, int energie, int degat, int coutAtt, int coutDep) { - this.affichage=affich; - this.portee = po; - this.regeneration = 2; - this.deplacement =dep; - this.energie=energie; - this.degat=degat; - this.coutAttaque=coutAtt; - this.coutDeplacement=coutDep; - } - - String getAffich() { - return this.affichage; - } - - int getEnergie() { - return this.energie; - } - - int getPortee() { - return this.portee; - } - - int getDeplacement(){ - return this.deplacement; - } - - int getRegeneration(){ - return this.regeneration; - } - - int getDegat() { - return this.degat; - } - - int getCoutAttaque() { - return this.coutAttaque; - } - - int getCoutDeplacement(){ - return this.coutDeplacement; - } - -}