Commit ef73d2bb authored by Guillaume Buret's avatar Guillaume Buret

Ajout de la classe Cabine, qui ne fait rien (car vide) mais au moins elle est présente

parent 95d7f260
......@@ -68,6 +68,7 @@ HEADERS += \
../../include/simul/contactlistener.h \
../../include/strategie/strategiev3.h \
../../include/strategie/etape.h \
../../include/strategie/cabine.h \
../../include/strategie/dijkstra.h \
../../include/hardware/tourelle.h \
../../src/strategie/clap.h \
......@@ -180,7 +181,8 @@ SOURCES += \
../../src/initkrabi.cpp \
../../src/initialisation.cpp \
../../src/strategie/krabijunior2016.cpp \
../../src/strategie/krabi2016.cpp
../../src/strategie/krabi2016.cpp \
../../src/strategie/cabine.cpp
FORMS += \
../../include/simul/remotedebug.ui \
......
#ifndef CABINE_H
#define CABINE_H
#include "position.h"
#include "mediumLevelAction.h"
#include "command.h"
class Cabine : public MediumLevelAction
{
public:
Cabine();
Cabine(Position position);
~Cabine();
int update();
Etape::EtapeType getType();
protected:
Position position;
};
#endif // CABINE_H
......@@ -18,6 +18,8 @@ public:
{
ROBOT_VU_ICI = 100,
CABINE = 8,
POINT_PASSAGE = 0,
COLLECT = 1,
FRUIT = 2,
......
......@@ -5,13 +5,12 @@
#define NOMBRE_ETAPES 50
#include "strategiev3.h"
#include "etape.h"
#include "clap.h"
#include "gobelet.h"
#include "tapis.h"
#include "cabine.h"
#include "ramasserPied.h"
#include "deposerGobelet.h"
#include "manipulationCoinGaucheBas.h"
......@@ -28,7 +27,7 @@ public:
/** @brief Actions de Krabi */
Clap actionClap[3];
Gobelet actionGobelet[5];
Tapis actionTapis[2];
Cabine actionCabine[2];
DeposerGobelet actionDeposerGobelet[3];
RamasserPied actionRamasserPied[8];
......
#include "cabine.h"
#include "strategieV2.h"
#include "mediumLevelAction.h"
#include "command.h"
#include "position.h"
#ifndef ROBOTHW
#include <QDebug>
#endif
Cabine::Cabine(){}
Cabine::Cabine(Position position):MediumLevelAction(position)
{
}
Cabine::~Cabine(){}
Etape::EtapeType Cabine::getType()
{
return Etape::CABINE;
}
int Cabine::update()
{
if (status == 0) //Début
{
#ifndef ROBOTHW
qDebug() << "Ouverture cabine";
#endif
}
return status;
}
......@@ -382,6 +382,8 @@ QString Etape::getNameType(EtapeType type)
{
switch(type)
{
case CABINE:
return "Cabine";
case POINT_PASSAGE:
return "Passage";
case DEPART:
......@@ -407,6 +409,8 @@ QString Etape::getShortNameType(EtapeType type)
{
switch(type)
{
case CABINE:
return "Cabine";
case POINT_PASSAGE:
return "";
case DEPART:
......
......@@ -69,8 +69,8 @@ Krabi2016::Krabi2016(bool isYellow) : StrategieV3(isYellow)
new Etape(13, new DeposerGobelet(Position(183, 496, true)) );
// Tapis
new Etape(17, new Tapis(Position(480, 780, true)) );
// Cabine
new Etape(17, new Cabine(Position(480, 780, true)) );
new Etape(36, new Tapis(Position(1420, 180, true)) );
// Ramasser Pied
......@@ -100,7 +100,7 @@ Krabi2016::Krabi2016(bool isYellow) : StrategieV3(isYellow)
// Voisins
Etape::get(0)->addVoisin(1);
Etape::get(17)->addVoisins(1);
Etape::get(18)->addVoisins(5, 1);
Etape::get(18)->addVoisins(35, 27);
Etape::get(20)->addVoisins(5, 35 , 28);
......@@ -130,6 +130,9 @@ int Krabi2016::getScoreEtape(int i){
return 1000;//STRATEGIE
// return 0;
case Etape::CABINE :
return 0;//STRATEGIE
case Etape::AMPOULE :
return 0;
......
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