Index: code/branches/SpaceRace_HS16/src/modules/gametypes/OldRaceCheckPoint.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/OldRaceCheckPoint.cc	(revision 11334)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OldRaceCheckPoint.h"
-
-#include "util/Convert.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "chat/ChatManager.h"
-
-#include "OldSpaceRace.h"
-
-namespace orxonox
-{
-    RegisterClass(OldRaceCheckPoint);
-
-    OldRaceCheckPoint::OldRaceCheckPoint(Context* context): DistanceTrigger(context), RadarViewable(this, static_cast<WorldEntity*>(this))
-    {
-        RegisterObject(OldRaceCheckPoint);
-
-        this->bCheckpointIndex_ = 0;
-        this->bIsLast_ = false;
-        this->bTimeLimit_ = 0;
-
-        this->setRadarObjectColour(ColourValue::Blue);
-        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
-        this->setRadarVisibility(false);
-    }
-
-    OldRaceCheckPoint::~OldRaceCheckPoint()
-    {
-    }
-
-    void OldRaceCheckPoint::tick(float dt)
-    {
-        SUPER(OldRaceCheckPoint, tick, dt);
-
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-        assert(gametype);
-        if (this->getCheckpointIndex() == gametype->getCheckpointsReached())
-            this->setRadarVisibility(true);
-        else
-            this->setRadarVisibility(false);
-    }
-
-    void OldRaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(OldRaceCheckPoint, XMLPort, xmlelement, mode);
-
-        XMLPortParam(OldRaceCheckPoint, "checkpointindex", setCheckpointIndex, getCheckpointIndex, xmlelement, mode).defaultValues(0);
-        XMLPortParam(OldRaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false);
-        XMLPortParam(OldRaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0);
-    }
-
-    void OldRaceCheckPoint::triggered(bool bIsTriggered)
-    {
-        DistanceTrigger::triggered(bIsTriggered);
-
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-        if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
-        {
-            gametype->clock_.capture();
-            float time = gametype->clock_.getSecondsPrecise();
-            if (this->bTimeLimit_!=0 && time > this->bTimeLimit_)
-            {
-                gametype->timeIsUp();
-                gametype->end();
-            }
-            else if (this->getLast())
-                gametype->end();
-            else
-            {
-                gametype->newCheckpointReached();
-                this->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
-            }
-        }
-    }
-
-    void OldRaceCheckPoint::setTimelimit(float timeLimit)
-    {
-        this->bTimeLimit_ = timeLimit;
-        if (this->bTimeLimit_ != 0)
-        {
-            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-            if (gametype)
-            {
-                const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
-                            + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
-                gametype->getGametypeInfo()->sendAnnounceMessage(message);
-                ChatManager::message(message);
-            }
-        }
-    }
-
-}
Index: code/branches/SpaceRace_HS16/src/modules/gametypes/OldRaceCheckPoint.h
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/OldRaceCheckPoint.h	(revision 11334)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _OldRaceCheckPoint_H__
-#define _OldRaceCheckPoint_H__
-
-#include "gametypes/GametypesPrereqs.h"
-
-#include "objects/triggers/DistanceTrigger.h"
-#include "interfaces/RadarViewable.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        The OldRaceCheckPoint class enables the creation of a check point to use in a OldSpaceRace level.
-        !!! Don't forget to control the indexes of your check points and to set one last check point!!!
-    */
-    class _GametypesExport OldRaceCheckPoint : public DistanceTrigger, public RadarViewable
-    {
-        public:
-            OldRaceCheckPoint(Context* context);
-            virtual ~OldRaceCheckPoint();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-            virtual void tick(float dt) override;
-
-            protected:
-            virtual void triggered(bool bIsTriggered) override;
-            inline void setLast(bool isLast)
-                { this->bIsLast_ = isLast; }
-            inline bool getLast()
-                { return this->bIsLast_; }
-            inline void setCheckpointIndex(int checkpointIndex)
-                { this->bCheckpointIndex_ = checkpointIndex; }
-            inline int getCheckpointIndex()
-                { return this->bCheckpointIndex_; }
-            virtual void setTimelimit(float timeLimit);
-            inline float getTimeLimit()
-                { return this->bTimeLimit_;}
-            virtual inline const WorldEntity* getWorldEntity() const override
-                { return this; }
-
-        private:
-            int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes.
-            bool bIsLast_; //True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
-            float bTimeLimit_; //The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
-      
-    };
-}
-
-#endif /* _OldRaceCheckPoint_H__ */
Index: code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.cc	(revision 11334)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *     Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OldSpaceRace.h"
-
-#include "core/CoreIncludes.h"
-#include "chat/ChatManager.h"
-#include "util/Convert.h"
-#include "util/Math.h"
-#include "infos/Bot.h"
-#include "items/Engine.h"
-#include "controllers/HumanController.h"
-
-#include "core/CoreIncludes.h"
-#include "chat/ChatManager.h"
-#include "infos/PlayerInfo.h"
-#include "worldentities/pawns/Pawn.h"
-#include "core/config/ConfigValueIncludes.h"
-#include "infos/Bot.h"
-#include "SpaceRaceBot.h"
-
-
-
-namespace orxonox
-{
-    RegisterUnloadableClass(OldSpaceRace);
-
-
-    OldSpaceRace::OldSpaceRace(Context* context) : Gametype(context)
-    {
-        RegisterObject(OldSpaceRace);
-        
-        //this->botclass_ = Class();
-        this->botclass_ = Class(SpaceRaceBot);//ClassByString("")
-
-        this->checkpointsReached_ = 0;
-        this->bTimeIsUp_ = false;
-        this->setConfigValues();
-    }
-
-    void OldSpaceRace::setConfigValues()
-    {
-       
-    
-    }
-
-    void OldSpaceRace::end()
-    {
-        this->Gametype::end();
-
-        if (this->bTimeIsUp_)
-        {
-            this->clock_.capture();
-            int s = this->clock_.getSeconds();
-            int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-            const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
-                        + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1)
-                        + " before the time limit. You lose!";
-            this->getGametypeInfo()->sendAnnounceMessage(message);
-            ChatManager::message(message);
-        }
-        else
-        {
-            this->clock_.capture();
-            int s = this->clock_.getSeconds();
-            int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-            const std::string& message = "Congratulations! Last check point reached after "+ multi_cast<std::string>(s)
-                        + "." + multi_cast<std::string>(ms) + " seconds.";
-            this->getGametypeInfo()->sendAnnounceMessage(message);
-            ChatManager::message(message);
-/*
-            float time = this->clock_.getSecondsPrecise();
-            this->scores_.insert(time);
-            std::set<float>::iterator it;
-            for (it=this->scores_.begin(); it!=this->scores_.end(); it++)
-                orxout(level::message) << multi_cast<std::string>(*it) << endl;
-*/
-        }
-    }
-
-    void OldSpaceRace::start()
-    {
-        Gametype::start();
-
-   if (true)
-        {
-            this->spawnPlayersIfRequested();
-            this->cantMove_ = true;
-
-            for (Engine* engine : ObjectList<Engine>()){
-                engine->setActive(false);
-                
-
-            }
-            
-        }
-
-        
-
-        std::string message("BE FAST BE FIRST");
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-
-Timer* countdownTimer = new Timer();
-        countdownTimer->setTimer(11, false, createExecutor(createFunctor(&OldSpaceRace::countdownFinished, this)));
-    }
-
-    void OldSpaceRace::countdownFinished()
-    {
-
-        std::string message("RACE STARTED ");
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-
-
-    for (Engine* engine : ObjectList<Engine>())
-                engine->setActive(true);
-    
-
-
-    }
- 
-
- void OldSpaceRace::playerEntered(PlayerInfo* player)
-    {
-        Gametype::playerEntered(player);
-
-        const std::string& message = player->getName() + " entered the game";
-        ChatManager::message(message);
-    }
-
-
-
-    void OldSpaceRace::newCheckpointReached()
-    {
-        this->checkpointsReached_++;
-        this->clock_.capture();
-        int s = this->clock_.getSeconds();
-        int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-        const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached())
-                        + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
-                        + " seconds.";
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-    }
-
-        /*void playerEntered(PlayerInfo* player) {
-
-
-                  Gametype::playerEntered(player);
-
-        const std::string& message = player->getName() + " entered the game";
-        ChatManager::message(message);
-            
-        }*/
-
-
-
-
- void OldSpaceRace::addBots(unsigned int amount)
-    {
-        for (unsigned int i = 0; i < amount; ++i)
-            this->botclass_.fabricate(this->getContext());
-    }
-
-
-
-
-
-}
Index: code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.h
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.h	(revision 11334)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _OldSpaceRace_H__
-#define _OldSpaceRace_H__
-
-#include "gametypes/GametypesPrereqs.h"
-
-#include <set>
-#include <string>
-
-#include <util/Clock.h>
-
-#include "gametypes/Gametype.h"
-#include "SpaceRaceManager.h"
-
-#include "OldRaceCheckPoint.h"
-
-namespace orxonox
-{
-  /**
-  @brief
-    The OldSpaceRace class enables the creation of a space race level, where the player has to reach check points in a given order.
-  */
-    class _GametypesExport OldSpaceRace : public Gametype
-    {
-        friend class OldRaceCheckPoint;
-
-        public:
-            OldSpaceRace(Context* context);
-            virtual ~OldSpaceRace() {}
-
-                        void setConfigValues();
-
-            virtual void start() override;
-
-            virtual void end() override;
-
-            virtual void playerEntered(PlayerInfo* player) override;
-            virtual void newCheckpointReached();
-            virtual void addBots(unsigned int amount) override; //<! overwrite function in order to bypass the addbots command.
-                                          //<! This is only a temporary solution. Better: create racingBots.
-
-
-            virtual  void countdownFinished();
-
-            inline void setCheckpointsReached(int n)
-                { this->checkpointsReached_ = n;}
-            inline int getCheckpointsReached()
-                { return this->checkpointsReached_; }
-            inline void timeIsUp()
-                { this->bTimeIsUp_ = true;}
-
-        protected:
-
-        private:
-            bool cantMove_;                                            ///< Helper variable, used to stall the engines before the race starts.
-            int checkpointsReached_; //The current number of check points reached by the player.
-            std::set<float> scores_; //The times of the players are saved in a set.
-            bool bTimeIsUp_; //True if one of the check points is reached too late.
-            Clock clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
-    };
-}
-
-#endif /* _OldSpaceRace_H__ */
Index: code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc	(revision 11334)
+++ code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc	(revision 11337)
@@ -23,16 +23,20 @@
  *     Mauro Salomon
  *   Co-authors:
- *      Celine Egger
+ *      Celine Egger*/
+        
+
+
+
+/*
+Edited, Renewed and Revised by 
         Berkay Berabi
         Louis Meile
- *
- */
-
-/*
-Todo:
+ 
+ 
+To-do- list by Louis Meile and Berkay Berabi for future projects :
 - improve AI (SpaceRaceController): 
 i) so far bots arent able to evade obstacles. fix that!
 ii) bots should be able to use pickups
-- game crashes when bot wins the game
+- game crashes when bot wins the game(this is a huge problem you should work with the log file to find out what the errors are )
 - bots rotate while waiting for the countdown to end. make it stop!
 - add elements to level file to make it even more fun to play. be creative!
@@ -81,5 +85,6 @@
         this->setConfigValues();
 
-        this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race
+        this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race 
+        //we fixed the number of bots in order to have the same starting position all the time ! 
     }
 
@@ -90,7 +95,7 @@
     }
 
+    void SpaceRace::start()
+    {
     // define spawn positions of the 5 bots
-    void SpaceRace::start()
-    {
 
         int startpos[15];
@@ -124,5 +129,5 @@
             this->spawnPlayersIfRequested();
             this->cantMove_ = true;
-            //bots unable to move while countdown is running
+            //players are unable to move while countdown is running
             for (Engine* engine : ObjectList<Engine>()){
                 engine->setActive(false);
@@ -151,5 +156,5 @@
         ChatManager::message(message);
 
-//after 11 s, countdownFinished is called to activate bots` engines
+//after 11 seconds , countdownFinished function is called to activate bots` engines
 Timer* countdownTimer = new Timer();
         countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
@@ -207,5 +212,5 @@
     }
 
- void SpaceRace::countdownFinished()
+ void SpaceRace::countdownFinished()//activates the engines of all players 
     {
 
@@ -231,5 +236,5 @@
 
 
- void SpaceRace::addBots(unsigned int amount)
+ void SpaceRace::addBots(unsigned int amount) //function that add the bots to the game 
     {
         for (unsigned int i = 1; i <= amount; ++i){
@@ -250,5 +255,6 @@
     }
 
-    bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)
+    bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)// false because the bots can not recognize the objects and die to early 
+                                                                    //if they can 
     {
         return false;
