Index: /code/branches/3DPacman_FS19/src/modules/pacman/CMakeLists.txt
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/CMakeLists.txt	(revision 12302)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/CMakeLists.txt	(revision 12303)
@@ -7,4 +7,5 @@
   PacmanHUDinfo.cc
   getShortestPath.cc
+  PacmanRandom.cc
 )
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/Pacman.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/Pacman.cc	(revision 12302)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/Pacman.cc	(revision 12303)
@@ -94,5 +94,4 @@
                 i++;
             }
-
             //Switch ghost to not-catchable, if timer is zero
             if(afraid){
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc	(revision 12302)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc	(revision 12303)
@@ -47,5 +47,4 @@
 
         this->velocity = Vector3(0, 0, 0);
-        this->colour = 1;
         this->setCollisionType(CollisionType::Dynamic);
         
@@ -77,10 +76,8 @@
         SUPER(PacmanGhost, XMLPort, xmlelement, mode);
 
-        XMLPortParam(PacmanGhost, "colour", setColour, getColour, xmlelement, mode);
-
-    }
-
-
-    //All positions in the map, see documentation
+    }
+
+
+   /* //All positions in the map, see documentation
     Vector3 possibleposition[] = {Vector3(20,10,245),Vector3(215,10,245),Vector3(215,10,195),Vector3(185,10,195),Vector3(135,10,195), //0-4
         Vector3(185,10,150),Vector3(135,10,150),Vector3(215,10,150),Vector3(215,10,105),Vector3(135,10,105), //5-9
@@ -96,5 +93,5 @@
         Vector3(-215,10,-85),Vector3(-215,10,-135),Vector3(-135,10,-135),Vector3(-70,10,-135),Vector3(-20,10,-135), //55-59
         Vector3(20,10,-135),Vector3(70,10,-135),Vector3(20,10,-195),Vector3(-20,10,-195),Vector3(-135,10,-195), //60-64
-        Vector3(-215,10,-195),Vector3(0,10,-35)}; //65-66
+        Vector3(-215,10,-195),Vector3(0,10,-35)}; //65-66*/
 
     /**
@@ -119,5 +116,5 @@
             if(!(abs(this->actuelposition.z-target_z)<0.5)) {
                 velocity = Vector3(0,0,-sgn(this->actuelposition.z-this->target_z));
-                move(dt, actuelposition, newGoal, velocity);
+                move(dt, actuelposition, velocity);
             }    
             if(!(abs(this->actuelposition.x-target_x)<0.5)){
@@ -127,250 +124,6 @@
         }
 
-        else{
-            while (lockmove){};
-            lockmove=true;
-            int goal_x = 0;     // faraway goal to dertmine the direction of the target
-            int goal_z =0;   
-
-            if(this.colour=1){//follow pacman
-                Vector3 newTar = getShortestPath(actuelposition, currentPosition) //acutuelPosition: ghost, currentPosition: Pacman
-                 setnewTarget(newTar)
-
-            }
-            //die uebrigen charakteren verhalten sich noch random
-            /*else if(this.colour=2){ 
-            }
-
-            else if(this.colour=3){
-
-            }
-
-            else if(this.colour=4){
-
-            }*/
-            
-        
-        
-            //Check on which position the ghost has arrived and set new target
-            else if{(this.colour=2) || (this.colour=3) || (this.colour=4)}
-                while(lockmove){};
-                lockmove = true;
-
-                if(findpos(actuelposition,possibleposition[0])){
-                	setnewTarget(1,17,19);
-                }
-                else if(findpos(actuelposition,possibleposition[1])){
-                	setnewTarget(0,2);
-                }
-                else if(findpos(actuelposition,possibleposition[2])){
-            		setnewTarget(1,3);
-                }
-                else if(findpos(actuelposition,possibleposition[3])){
-    			    setnewTarget(2,4,5);
-                }
-                else if(findpos(actuelposition,possibleposition[4])){
-    				setnewTarget(3,6);
-                }
-                else if(findpos(actuelposition,possibleposition[5])){
-                	setnewTarget(3,7);
-                }
-                else if(findpos(actuelposition,possibleposition[6])){
-                    setnewTarget(4,9,26);
-                }
-                else if(findpos(actuelposition,possibleposition[7])){
-                    setnewTarget(5,8);
-                }
-                else if(findpos(actuelposition,possibleposition[8])){
-                    setnewTarget(7,9);
-                }
-                else if(findpos(actuelposition,possibleposition[9])){
-                    setnewTarget(6,8,10,38);
-                }
-                else if(findpos(actuelposition,possibleposition[10])){
-                    setnewTarget(9,11,45);
-                }
-                else if(findpos(actuelposition,possibleposition[11])){
-                    setnewTarget(10,12,13);
-                }
-                else if(findpos(actuelposition,possibleposition[12])){
-                    setnewTarget(11,14);
-                }
-                else if(findpos(actuelposition,possibleposition[13])){
-                    setnewTarget(11,14,16,61);
-                }
-                else if(findpos(actuelposition,possibleposition[14])){
-                    setnewTarget(12,13,15);
-                }
-                else if(findpos(actuelposition,possibleposition[15])){
-                    setnewTarget(14,16);
-                }
-                else if(findpos(actuelposition,possibleposition[16])){
-                    setnewTarget(13,15,62);
-                }
-                else if(findpos(actuelposition,possibleposition[17])){
-                    setnewTarget(0,25);
-                }
-                else if(findpos(actuelposition,possibleposition[18])){
-                    setnewTarget(19,24);
-                }
-                else if(findpos(actuelposition,possibleposition[19])){
-                    setnewTarget(0,18,20);
-                }
-                else if(findpos(actuelposition,possibleposition[20])){
-                    setnewTarget(19,21);
-                }
-                else if(findpos(actuelposition,possibleposition[21])){
-                    setnewTarget(20,22);
-                }
-                else if(findpos(actuelposition,possibleposition[22])){
-                    setnewTarget(21,23,31);
-                }
-                else if(findpos(actuelposition,possibleposition[23])){
-                    setnewTarget(22,30);
-                }
-                else if(findpos(actuelposition,possibleposition[24])){
-                    setnewTarget(18,29);
-                }
-                else if(findpos(actuelposition,possibleposition[25])){
-                    setnewTarget(17,26);
-                }
-                else if(findpos(actuelposition,possibleposition[26])){
-                    setnewTarget(6,25,27);
-                }
-                else if(findpos(actuelposition,possibleposition[27])){
-                    setnewTarget(26,28,37);
-                }
-                else if(findpos(actuelposition,possibleposition[28])){
-                    setnewTarget(27,29,36);
-                }
-                else if(findpos(actuelposition,possibleposition[29])){
-                    setnewTarget(24,28,30);
-                }
-                else if(findpos(actuelposition,possibleposition[30])){
-                    setnewTarget(23,29,34);
-                }
-                else if(findpos(actuelposition,possibleposition[31])){
-                    setnewTarget(22,32);
-                }
-                else if(findpos(actuelposition,possibleposition[32])){
-                    setnewTarget(31,33);
-                }
-                else if(findpos(actuelposition,possibleposition[33])){
-                    setnewTarget(32,34);
-                }
-                else if(findpos(actuelposition,possibleposition[34])){
-                    setnewTarget(30,33,35,42);
-                }
-                else if(findpos(actuelposition,possibleposition[35])){
-                    setnewTarget(34,36,41);
-                }
-                else if(findpos(actuelposition,possibleposition[36])){
-                    setnewTarget(28,35);
-                }
-                else if(findpos(actuelposition,possibleposition[37])){
-                    setnewTarget(27,38);
-                }
-                else if(findpos(actuelposition,possibleposition[38])){
-                    setnewTarget(9,37,39);
-                }
-                else if(findpos(actuelposition,possibleposition[39])){
-                    setnewTarget(38,40,45);
-                }
-                else if(findpos(actuelposition,possibleposition[40])){
-                    setnewTarget(39,41); //Shouldn't be able to return in center
-                }
-                else if(findpos(actuelposition,possibleposition[41])){
-                    setnewTarget(35,43);
-                }
-                else if(findpos(actuelposition,possibleposition[42])){
-                    setnewTarget(34,43,54);
-                }
-                else if(findpos(actuelposition,possibleposition[43])){
-                    setnewTarget(41,46);
-                }
-                else if(findpos(actuelposition,possibleposition[44])){
-                    setnewTarget(40,66);
-                }
-                else if(findpos(actuelposition,possibleposition[45])){
-                    setnewTarget(10,39,49);
-                }
-                else if(findpos(actuelposition,possibleposition[46])){
-                    setnewTarget(43,47);
-                }
-                else if(findpos(actuelposition,possibleposition[47])){
-                    setnewTarget(46,52,66);
-                }
-                else if(findpos(actuelposition,possibleposition[48])){
-                    setnewTarget(49,51,66);
-                }
-                else if(findpos(actuelposition,possibleposition[49])){
-                    setnewTarget(45,48);
-                }
-                else if(findpos(actuelposition,possibleposition[50])){
-                    setnewTarget(51,61);
-                }
-                else if(findpos(actuelposition,possibleposition[51])){
-                    setnewTarget(48,50);
-                }
-                else if(findpos(actuelposition,possibleposition[52])){
-                    setnewTarget(47,53);
-                }
-                else if(findpos(actuelposition,possibleposition[53])){
-                    setnewTarget(52,58);
-                }
-                else if(findpos(actuelposition,possibleposition[54])){
-                    setnewTarget(42,55,57);
-                }
-                else if(findpos(actuelposition,possibleposition[55])){
-                    setnewTarget(54,56);
-                }
-                else if(findpos(actuelposition,possibleposition[56])){
-                    setnewTarget(55,57,65);
-                }
-                else if(findpos(actuelposition,possibleposition[57])){
-                    setnewTarget(54,56,58,64);
-                }
-                else if(findpos(actuelposition,possibleposition[58])){
-                    setnewTarget(53,57,59);
-                }
-                else if(findpos(actuelposition,possibleposition[59])){
-                    setnewTarget(58,59,63);
-                }
-                else if(findpos(actuelposition,possibleposition[60])){
-                    setnewTarget(59,61,62);
-                }
-                else if(findpos(actuelposition,possibleposition[61])){
-                    setnewTarget(13,50,60);
-                }
-                else if(findpos(actuelposition,possibleposition[62])){
-                    setnewTarget(16,60);
-                }
-                else if(findpos(actuelposition,possibleposition[63])){
-                    setnewTarget(59,64);
-                }
-                else if(findpos(actuelposition,possibleposition[64])){
-                    setnewTarget(57,63,65);
-                }
-                else if(findpos(actuelposition,possibleposition[65])){
-                    setnewTarget(56,64);
-                }
-                else if(findpos(actuelposition,possibleposition[66])){
-                    setnewTarget(47,48);
-            }
-
-            else{
-                this->resetGhost(); //Shouldn't happen...
-            } //End of Position table
-                lockmove = false;
-            }
-        }
-    }
-    //set a specific newTarget
-    void PacmanGhost::setnewTarget(Vector3 newTarget){
-
-        this->target_x = newTarget.x;
-        this->target_z = newTarget.;
-        this->ismoving = true;
-    }
+    }
+
 
     //Random choice of new target (not used in game, but useful)
@@ -387,75 +140,4 @@
     }
 
-    //Random choice of new target
-    void PacmanGhost::setnewTarget(int firstdec, int seconddec){ 
-    	   decision = rand()%2;
-            switch(decision){
-                case 0:
-                    this->target_x = possibleposition[firstdec].x;
-                    this->target_z = possibleposition[firstdec].z; 
-                    this->ismoving = true;
-                    break;
-                case 1:
-                    this->target_x = possibleposition[seconddec].x;
-                    this->target_z = possibleposition[seconddec].z; 
-                    this->ismoving = true;
-                    break;  
-            }
-            
-    }
-
-    //Random choice of new target
-    void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec){
-        
-    	   decision = rand()%3;
-            switch(decision){
-                case 0:
-                    this->target_x = possibleposition[firstdec].x;
-                    this->target_z = possibleposition[firstdec].z; 
-                    this->ismoving = true;
-                    break;
-                case 1:
-                    this->target_x = possibleposition[seconddec].x;
-                    this->target_z = possibleposition[seconddec].z; 
-                    this->ismoving = true;
-                    break;
-                case 2:
-                    this->target_x = possibleposition[thirddec].x;
-                    this->target_z = possibleposition[thirddec].z; 
-                    this->ismoving = true;
-                    break;    
-    		}
-            
-	}
-
-    //Random choice of new target
-    void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec, int fourthdec){
-        
-    	   decision = rand()%4;
-            switch(decision){
-                case 0:
-                    this->target_x = possibleposition[firstdec].x;
-                    this->target_z = possibleposition[firstdec].z; 
-                    this->ismoving = true;
-                    break;
-                case 1:
-                    this->target_x = possibleposition[seconddec].x;
-                    this->target_z = possibleposition[seconddec].z; 
-                    this->ismoving = true;
-                    break;
-                case 2:
-                    this->target_x = possibleposition[thirddec].x;
-                    this->target_z = possibleposition[thirddec].z; 
-                    this->ismoving = true;
-                    break;
-                case 3:
-                	this->target_x = possibleposition[fourthdec].x;
-                    this->target_z = possibleposition[fourthdec].z; 
-                    this->ismoving = true;
-                    break;    
-    		}
-            
-	}
-
     //Change this with other ghost
     void PacmanGhost::changewith(PacmanGhost* otherghost){
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h	(revision 12302)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h	(revision 12303)
@@ -58,12 +58,5 @@
             bool dontmove = false;
 
-            //analog AutonomousDrone.h
-            inline void setColour( int newColour )
-                { this->coulour = newColour; }
 
-            inline int getColour()
-                { return this->coulour;}
-
-        private:
             int decision = 0; 
             Vector3 resetposition = Vector3(0,10,15);
@@ -73,16 +66,25 @@
             Vector3 actuelposition;
             bool ismoving = false;
-            int target_x = 0;   // one step 
-            int target_z = 0; 
+            int target_x = 0; 
+            int target_z = 0;
+            bool lockmove = false;
 
-            bool lockmove = false;
-            int colour=0;
-            /*
-            colour=
-            1: red:     follow
-            2: pink:    get infront of him   
-            3: blue:    patrol an area
-            4: orange:  get away of Pacman
-            */
+            //All positions in the map, see documentation
+    Vector3 possibleposition[67] = {Vector3(20,10,245),Vector3(215,10,245),Vector3(215,10,195),Vector3(185,10,195),Vector3(135,10,195), //0-4
+        Vector3(185,10,150),Vector3(135,10,150),Vector3(215,10,150),Vector3(215,10,105),Vector3(135,10,105), //5-9
+        Vector3(135,10,15),Vector3(135,10,-85),Vector3(215,10,-85),Vector3(135,10,-135),Vector3(215,10,-135), //10-14
+        Vector3(215,10,-195),Vector3(135,10,-195),Vector3(20,10,195),Vector3(-20,10,195),Vector3(-20,10,245), //15-19
+        Vector3(-215,10,245),Vector3(-215,10,195),Vector3(-185,10,195),Vector3(-135,10,195),Vector3(-70,10,195), //20-24
+        Vector3(70,10,195),Vector3(70,10,150),Vector3(20,10,150),Vector3(-20,10,150),Vector3(-70,10,150), //25-29
+        Vector3(-135,10,150),Vector3(-185,10,150),Vector3(-215,10,150),Vector3(-215,10,105),Vector3(-135,10,105), //30-34
+        Vector3(-70,10,105),Vector3(-20,10,105),Vector3(20,10,105),Vector3(70,10,105),Vector3(70,10,60), //35-39
+        Vector3(0,10,60),Vector3(-70,10,60),Vector3(-135,10,15),Vector3(-70,10,60),Vector3(0,10,15), //40-44
+        Vector3(70,10,15),Vector3(-70,10,-35),Vector3(-20,10,-35),Vector3(20,10,-35),Vector3(70,10,-35), //45-49
+        Vector3(70,10,-85),Vector3(20,10,-85),Vector3(-20,10,-85),Vector3(-70,10,-85),Vector3(-135,10,-85), //50-54
+        Vector3(-215,10,-85),Vector3(-215,10,-135),Vector3(-135,10,-135),Vector3(-70,10,-135),Vector3(-20,10,-135), //55-59
+        Vector3(20,10,-135),Vector3(70,10,-135),Vector3(20,10,-195),Vector3(-20,10,-195),Vector3(-135,10,-195), //60-64
+        Vector3(-215,10,-195),Vector3(0,10,-35)}; //65-66
+
+        private:
             void setnewTarget(int firstdec);
             void setnewTarget(int firstdec, int seconddec);
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.cc	(revision 12303)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.cc	(revision 12303)
@@ -0,0 +1,335 @@
+
+	#include "PacmanGhost.h"
+
+
+	namespace orxonox{
+	class PacmanRandom : public PacmanGhost {
+
+		public:
+
+           /* int decision=0;
+            int target_x = 0; 
+            int target_z = 0;
+            bool ismoving = false;
+            bool lockmove = false;*/
+
+
+		//Random choice of new target (not used in game, but useful)
+    void setnewTarget(int firstdec){ 
+    //setNewTarget in PacmanGhost seems to be private so we need it here too
+        
+    	  decision = rand()%1;
+            switch(decision){
+                case 0:
+                    this->target_x = possibleposition[firstdec].x;
+                    this->target_z = possibleposition[firstdec].z; 
+                    this->ismoving = true;
+                    break;
+    		}
+    }	
+
+
+    //Random choice of new target
+    void setnewTarget(int firstdec, int seconddec){ 
+    	   decision = rand()%2;
+            switch(decision){
+                case 0:
+                    this->target_x = possibleposition[firstdec].x;
+                    this->target_z = possibleposition[firstdec].z; 
+                    this->ismoving = true;
+                    break;
+                case 1:
+                    this->target_x = possibleposition[seconddec].x;
+                    this->target_z = possibleposition[seconddec].z; 
+                    this->ismoving = true;
+                    break;  
+            }
+            
+    }
+
+    //Random choice of new target
+    void setnewTarget(int firstdec, int seconddec, int thirddec){
+        
+    	   decision = rand()%3;
+            switch(decision){
+                case 0:
+                    this->target_x = possibleposition[firstdec].x;
+                    this->target_z = possibleposition[firstdec].z; 
+                    this->ismoving = true;
+                    break;
+                case 1:
+                    this->target_x = possibleposition[seconddec].x;
+                    this->target_z = possibleposition[seconddec].z; 
+                    this->ismoving = true;
+                    break;
+                case 2:
+                    this->target_x = possibleposition[thirddec].x;
+                    this->target_z = possibleposition[thirddec].z; 
+                    this->ismoving = true;
+                    break;    
+    		}
+            
+	}
+
+    //Random choice of new target
+    void setnewTarget(int firstdec, int seconddec, int thirddec, int fourthdec){
+        
+    	   decision = rand()%4;
+            switch(decision){
+                case 0:
+                    this->target_x = possibleposition[firstdec].x;
+                    this->target_z = possibleposition[firstdec].z; 
+                    this->ismoving = true;
+                    break;
+                case 1:
+                    this->target_x = possibleposition[seconddec].x;
+                    this->target_z = possibleposition[seconddec].z; 
+                    this->ismoving = true;
+                    break;
+                case 2:
+                    this->target_x = possibleposition[thirddec].x;
+                    this->target_z = possibleposition[thirddec].z; 
+                    this->ismoving = true;
+                    break;
+                case 3:
+                	this->target_x = possibleposition[fourthdec].x;
+                    this->target_z = possibleposition[fourthdec].z; 
+                    this->ismoving = true;
+                    break;    
+    		}
+            
+	}
+
+	void tick(float dt){
+
+		PacmanGhost::tick(dt);
+
+
+		if(!(this->ismoving)){
+
+            while(lockmove){};
+            lockmove = true;
+
+            if(findpos(actuelposition,possibleposition[0])){
+            	setnewTarget(1,17,19);
+            }
+            else if(findpos(actuelposition,possibleposition[1])){
+            	setnewTarget(0,2);
+            }
+            else if(findpos(actuelposition,possibleposition[2])){
+        		setnewTarget(1,3);
+            }
+            else if(findpos(actuelposition,possibleposition[3])){
+			    setnewTarget(2,4,5);
+            }
+            else if(findpos(actuelposition,possibleposition[4])){
+				setnewTarget(3,6);
+            }
+            else if(findpos(actuelposition,possibleposition[5])){
+            	setnewTarget(3,7);
+            }
+            else if(findpos(actuelposition,possibleposition[6])){
+                setnewTarget(4,9,26);
+            }
+            else if(findpos(actuelposition,possibleposition[7])){
+                setnewTarget(5,8);
+            }
+            else if(findpos(actuelposition,possibleposition[8])){
+                setnewTarget(7,9);
+            }
+            else if(findpos(actuelposition,possibleposition[9])){
+                setnewTarget(6,8,10,38);
+            }
+            else if(findpos(actuelposition,possibleposition[10])){
+                setnewTarget(9,11,45);
+            }
+            else if(findpos(actuelposition,possibleposition[11])){
+                setnewTarget(10,12,13);
+            }
+            else if(findpos(actuelposition,possibleposition[12])){
+                setnewTarget(11,14);
+            }
+            else if(findpos(actuelposition,possibleposition[13])){
+                setnewTarget(11,14,16,61);
+            }
+            else if(findpos(actuelposition,possibleposition[14])){
+                setnewTarget(12,13,15);
+            }
+            else if(findpos(actuelposition,possibleposition[15])){
+                setnewTarget(14,16);
+            }
+            else if(findpos(actuelposition,possibleposition[16])){
+                setnewTarget(13,15,62);
+            }
+            else if(findpos(actuelposition,possibleposition[17])){
+                setnewTarget(0,25);
+            }
+            else if(findpos(actuelposition,possibleposition[18])){
+                setnewTarget(19,24);
+            }
+            else if(findpos(actuelposition,possibleposition[19])){
+                setnewTarget(0,18,20);
+            }
+            else if(findpos(actuelposition,possibleposition[20])){
+                setnewTarget(19,21);
+            }
+            else if(findpos(actuelposition,possibleposition[21])){
+                setnewTarget(20,22);
+            }
+            else if(findpos(actuelposition,possibleposition[22])){
+                setnewTarget(21,23,31);
+            }
+            else if(findpos(actuelposition,possibleposition[23])){
+                setnewTarget(22,30);
+            }
+            else if(findpos(actuelposition,possibleposition[24])){
+                setnewTarget(18,29);
+            }
+            else if(findpos(actuelposition,possibleposition[25])){
+                setnewTarget(17,26);
+            }
+            else if(findpos(actuelposition,possibleposition[26])){
+                setnewTarget(6,25,27);
+            }
+            else if(findpos(actuelposition,possibleposition[27])){
+                setnewTarget(26,28,37);
+            }
+            else if(findpos(actuelposition,possibleposition[28])){
+                setnewTarget(27,29,36);
+            }
+            else if(findpos(actuelposition,possibleposition[29])){
+                setnewTarget(24,28,30);
+            }
+            else if(findpos(actuelposition,possibleposition[30])){
+                setnewTarget(23,29,34);
+            }
+            else if(findpos(actuelposition,possibleposition[31])){
+                setnewTarget(22,32);
+            }
+            else if(findpos(actuelposition,possibleposition[32])){
+                setnewTarget(31,33);
+            }
+            else if(findpos(actuelposition,possibleposition[33])){
+                setnewTarget(32,34);
+            }
+            else if(findpos(actuelposition,possibleposition[34])){
+                setnewTarget(30,33,35,42);
+            }
+            else if(findpos(actuelposition,possibleposition[35])){
+                setnewTarget(34,36,41);
+            }
+            else if(findpos(actuelposition,possibleposition[36])){
+                setnewTarget(28,35);
+            }
+            else if(findpos(actuelposition,possibleposition[37])){
+                setnewTarget(27,38);
+            }
+            else if(findpos(actuelposition,possibleposition[38])){
+                setnewTarget(9,37,39);
+            }
+            else if(findpos(actuelposition,possibleposition[39])){
+                setnewTarget(38,40,45);
+            }
+            else if(findpos(actuelposition,possibleposition[40])){
+                setnewTarget(39,41); //Shouldn't be able to return in center
+            }
+            else if(findpos(actuelposition,possibleposition[41])){
+                setnewTarget(35,43);
+            }
+            else if(findpos(actuelposition,possibleposition[42])){
+                setnewTarget(34,43,54);
+            }
+            else if(findpos(actuelposition,possibleposition[43])){
+                setnewTarget(41,46);
+            }
+            else if(findpos(actuelposition,possibleposition[44])){
+                setnewTarget(40,66);
+            }
+            else if(findpos(actuelposition,possibleposition[45])){
+                setnewTarget(10,39,49);
+            }
+            else if(findpos(actuelposition,possibleposition[46])){
+                setnewTarget(43,47);
+            }
+            else if(findpos(actuelposition,possibleposition[47])){
+                setnewTarget(46,52,66);
+            }
+            else if(findpos(actuelposition,possibleposition[48])){
+                setnewTarget(49,51,66);
+            }
+            else if(findpos(actuelposition,possibleposition[49])){
+                setnewTarget(45,48);
+            }
+            else if(findpos(actuelposition,possibleposition[50])){
+                setnewTarget(51,61);
+            }
+            else if(findpos(actuelposition,possibleposition[51])){
+                setnewTarget(48,50);
+            }
+            else if(findpos(actuelposition,possibleposition[52])){
+                setnewTarget(47,53);
+            }
+            else if(findpos(actuelposition,possibleposition[53])){
+                setnewTarget(52,58);
+            }
+            else if(findpos(actuelposition,possibleposition[54])){
+                setnewTarget(42,55,57);
+            }
+            else if(findpos(actuelposition,possibleposition[55])){
+                setnewTarget(54,56);
+            }
+            else if(findpos(actuelposition,possibleposition[56])){
+                setnewTarget(55,57,65);
+            }
+            else if(findpos(actuelposition,possibleposition[57])){
+                setnewTarget(54,56,58,64);
+            }
+            else if(findpos(actuelposition,possibleposition[58])){
+                setnewTarget(53,57,59);
+            }
+            else if(findpos(actuelposition,possibleposition[59])){
+                setnewTarget(58,59,63);
+            }
+            else if(findpos(actuelposition,possibleposition[60])){
+                setnewTarget(59,61,62);
+            }
+            else if(findpos(actuelposition,possibleposition[61])){
+                setnewTarget(13,50,60);
+            }
+            else if(findpos(actuelposition,possibleposition[62])){
+                setnewTarget(16,60);
+            }
+            else if(findpos(actuelposition,possibleposition[63])){
+                setnewTarget(59,64);
+            }
+            else if(findpos(actuelposition,possibleposition[64])){
+                setnewTarget(57,63,65);
+            }
+            else if(findpos(actuelposition,possibleposition[65])){
+                setnewTarget(56,64);
+            }
+            else if(findpos(actuelposition,possibleposition[66])){
+                setnewTarget(47,48);
+            }
+
+            else{
+                this->resetGhost(); //Shouldn't happen...
+            } //End of Position table
+                lockmove = false;
+        }
+
+        //end of function
+
+
+	}
+
+		private:
+
+
+
+			//end of class
+	};
+
+
+	//namespae orxonox
+	}
