Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.cc	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.cc	(revision 12357)
@@ -16,5 +16,5 @@
         this->target_x=0;
         this->target_z=15;
-        this->lastPlayerPassedPoint=Vector3(0,0,0); //Vector3(70,10,-135);
+        this->lastPlayerPassedPoint=Vector3(0,0,0); 
           
     }
@@ -79,10 +79,8 @@
 
             this->ismoving=false;
-            std::cout<<"weie"<<endl;
         }
         
         //Check on which position the ghost has arrived and set new target
         else{
-            std::cout<<"naye"<<endl;
         	while(lockmove){};
             lockmove = true;
@@ -92,5 +90,4 @@
 
             Vector3 brownPos=Vector3(this->target_x, 10, this->target_z);
-            std::cout<<brownPos<<endl;
 
             
@@ -98,6 +95,4 @@
                 if(findpos(brownPos, Vector3(-215,10,-195))){
                     this->isFleeing=false;
-                    //Vector3 nextMoveP = getShortestPath(brownPos, this->lastPlayerPassedPoint);
-                    //this->setNewTargetGhost(nextMoveP);
                 }
                 else{
@@ -124,7 +119,6 @@
                         setNewTargetGhost(nextMove);
                     }
-
+                    
             }
-            std::cout<<this->isFleeing<<endl;
 
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanBrown.h	(revision 12357)
@@ -2,8 +2,5 @@
 #define _PacmanBrown_H__
 
-
 #include "PacmanGhost.h"
-//#include "getShortestPath.h"
-
 
 namespace orxonox {
@@ -14,5 +11,5 @@
 			PacmanBrown(Context* context);
 
-			virtual void tick(float dt) override; //!< Defines which actions the AutonomousDrone has to take in each tick.
+			  virtual void tick(float dt) override; //!< Defines which actions the AutonomousDrone has to take in each tick.
 
   			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
@@ -37,7 +34,4 @@
         bool isAdjacentToPlayerLastPastPoint(Vector3 pacmanBrownPos, Vector3 arrayForNeighborPositions[]);
 
-        //void findNeighboorPositions(Vector3 actuelposition, Vector3 adjacentPositions[], Vector3 positionArray[]);
-
-
 	};
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.cc	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.cc	(revision 12357)
@@ -4,6 +4,4 @@
 #include "core/CoreIncludes.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
-
-
 
 	namespace orxonox{
@@ -39,8 +37,5 @@
         
         SUPER(PacmanGhost, tick, dt);
-
         this->actuelposition = this->getPosition();
-
-
 
         //Stop, if target arrived
@@ -51,6 +46,5 @@
 
         //Move, if ghost hasn't arrived yet
-        if(this->ismoving){
-            
+        if(this->ismoving){     
             if(!(abs(this->actuelposition.z-target_z)<0.5)) {
                 velocity = Vector3(0,0,-sgn(this->actuelposition.z-this->target_z));
@@ -60,18 +54,9 @@
                 velocity = Vector3(-sgn(this->actuelposition.x-this->target_x),0,0);
                 move(dt, actuelposition, velocity);
-            }
-            
+            }    
         }
 
         //Check on which position the ghost has arrived and set new target
         else{
-
-            std::cout<<startPatrol<<endl;
-            std::cout<<goalPatrol<<endl;
-            std::cout<<isPatrolling<<endl;
-            std::cout<<this->actuelposition<<endl;
-            std::cout<<this->passedByStart<<endl;
-            std::cout<<this->passedByGoal<<endl;
-
             while(lockmove){};
             lockmove = true;
@@ -86,5 +71,5 @@
 
             }
-            else if/*((!findpos(cyanPos, startPatrol))&&*/(this->passedByStart==false)/*)*/{
+            else if(this->passedByStart==false){
                 //we have not even reached our startPatrol point
 
@@ -96,5 +81,5 @@
                 }
             }
-            else if/*((!findpos(cyanPos, goalPatrol))&&*/(this->passedByGoal==false)/*)*/{
+            else if(this->passedByGoal==false){
                 //we have reached our startPatrol point, now we go to goalPoint
 
@@ -113,5 +98,5 @@
 
             }
-            else /*if(findpos(cyanPos, this->startPatrol))*/{
+            else {
                 //we reached startPoint again. Either we change patrol
                 //or redo same patrol
@@ -130,7 +115,4 @@
             }
 
-
-
-
             lockmove=false; //NEVER FORGET THIS ONE !!!!!!!
         }
@@ -139,5 +121,4 @@
 
     void PacmanCyan::nextPatrol(){
-
 
                 int indexRand1=rand()%67;
@@ -155,12 +136,6 @@
                 }
 
-
-
-
               this->startPatrol =  possibleposition[indexRand1];
               this->goalPatrol = possibleposition[indexRand2];
-
-              /*PatrolPosition startPatPol = PatrolPosition(startPatrol);
-              PatrolPosition goalPatrol = PatrolPosition(goalPatrol);*/
 
               this->passedByStart=false;
@@ -180,19 +155,4 @@
 	}
 
-    /*struct PacmanCyan::PatrolPosition{
-        //we need to check if PacmanCyan already passed the goal resp. start patrol point
-
-    public:
-
-        Vector3 position;
-        bool visitedPoint;
-
-        PatrolPosition(Vector3 positionP){
-            this->position=positionP;
-            visitedPoint=false;
-        }
-
-    };*/
-
 
 }
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanCyan.h	(revision 12357)
@@ -2,8 +2,5 @@
 #define _PacmanCyan_H__
 
-
 #include "PacmanGhost.h"
-//#include "getShortestPath.h"
-
 
 namespace orxonox {
@@ -14,5 +11,5 @@
 			PacmanCyan(Context* context);
 
-			virtual void tick(float dt) override; //!< Defines which actions the AutonomousDrone has to take in each tick.
+			  virtual void tick(float dt) override; //!< Defines which actions the AutonomousDrone has to take in each tick.
 
   			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
@@ -32,6 +29,4 @@
   			bool passedByGoal;
 
-
-
 	};
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc	(revision 12357)
@@ -45,6 +45,4 @@
 			graphVertex *adjacentVertices[4]; //neighbooring vertices
 
-			//would a vector of vector storing the neighboors not be more suitable ?
-
 			int shortestDistanceToStart; //actual shortest distance to start point
 			graphVertex* actuelPredecessor; //the predecessor giving the for now shortest 
@@ -227,5 +225,5 @@
 			return player->getWorldPosition();
 		}
-		//std::cout<<"bug ??"<<endl;
+		
 		return Vector3(0,0,0); //default, should not be used
 
@@ -234,4 +232,6 @@
 
 	bool PacmanGhost::jeanfindpos(Vector3 one, Vector3 other){
+		//This function is used to detect the last Vector3 position that the player crossed.
+
 		if((abs(one.x - other.x)<15) && (abs(one.y - other.y)<15) && (abs(one.z - other.z)<15)) return true;
 		return false;
@@ -239,4 +239,5 @@
 
 	void PacmanGhost::setNewTargetGhost(Vector3 goalToGo){
+		//Ghosts will go to goalToGo
 
 		this->target_x = goalToGo.x;
@@ -262,6 +263,4 @@
 		graphVertex* actualVertex; //we will walk through the array with a pointer
 
-        //vector<graphVertex> listOfVertices;
-
 
 		if(start==goal){ // basic case
@@ -271,13 +270,11 @@
 		for(int an=0; an < 67; an++){
 			listOfVerticesM[an]= graphVertex(possibleposition[an]); //same position order as in other file
-            //listOfVertices.at(an) = graphVertex(possibleposition[an]);
+            
 
 			if(start==possibleposition[an]){
 				actualVertex= &listOfVerticesM[an]; //our pointer points to the graph with position start in array
-				//cout<<an<<endl;
-			}
-		}
-
-		//graphVertex actualVertex= listOfVerticesM[an];
+				
+			}
+		}
 
 		actualVertex->alreadyVisited=true; //our start point is now visited
@@ -290,5 +287,5 @@
 				if(actualVertex->adjacentVertices[h]!=nullptr){ //check all neighboors of our current graphVertex
 
-					//h=2 and 3 never reached
+					
 					updateShortestDistanceToStart(*actualVertex, *actualVertex->adjacentVertices[h]);
 				} //we "update" the neighboors of our new visited vertex
@@ -296,11 +293,7 @@
 			}
 
-            if(actualVertex==nullptr){
-                std::cout<<"Ornopdpde"<<endl;
-            }
-
 			actualVertex=findNextVertexToConsider(listOfVerticesM, pointToAvoidP1);
 			actualVertex->alreadyVisited=true;
-			//cout<<actualVertex->position<<endl;
+			
 			if(actualVertex->position!=goal){
 				findNeighboorVertices(actualVertex->position, actualVertex->adjacentVertices, listOfVerticesM); 
@@ -309,6 +302,4 @@
 		}
 
-		//cout<<"meuejeeke"<<endl; never reached
-
 		//we should have reached our goal at this point
 
@@ -326,5 +317,5 @@
 
 	int PacmanGhost::graphDistance(Vector3 start, Vector3 goal){
-		//cout<<hgj++<<endl;
+		
 		Vector3 differenceVector= Vector3(abs(goal.x-start.x), 0,abs(goal.z-start.z));
 
@@ -361,15 +352,15 @@
 					shortestDistance= graphDistance(vertex.position, vertex.adjacentVertices[i]->position);
 					nearestNonVisitedNeighboor=vertex.adjacentVertices[i]; //warning, both sides are pointer adresses !
-					//cout<<shortestDistance<<endl;
+					
 				}
 				else if(graphDistance(vertex.position, vertex.adjacentVertices[i]->position)<shortestDistance){
 					shortestDistance= graphDistance(vertex.position, vertex.adjacentVertices[i]->position);
 					nearestNonVisitedNeighboor=vertex.adjacentVertices[i]; //warning, both sides are pointer adresses !
-					//cout<<(hgj++)%4<<endl;
+					
 				}
 			}
 		}
 		vertex.currentNearestNonVisitedNeighboor = nearestNonVisitedNeighboor; //warning, both sides are pointer adresses !
-		//cout<<hgj++<<endl;
+		
 	}
 
@@ -422,331 +413,322 @@
 	//////////////////////////////////////////////////////////////////////////////////////////////
 
-	//-215 -185 -135 -70 -20 0 20 70 135 185 215 
-
-	//-195 -135 -85 -35 15 60 105 150 195 245
-
 	void PacmanGhost::findNeighboorVertices(Vector3 actuelposition, graphVertex* adjacentVertices[], graphVertex listOfVerticesP2[]){      
-
+		//Should put in adjacentVertices the neighboor points of actuelposition. listOfVertices is the
+		//array containing all possible positions in the map.
 
 		if(findpos(actuelposition,possibleposition[0])){
-			// we should use listOfVerticesP2[i] instead of possibleposition[i] I think
-			// so that all neighboors are "the same"
-			adjacentVertices[0]=&listOfVerticesP2[1]; //graphVertex(possibleposition[1]);  //need to do it everywhere !!!
-			adjacentVertices[1]=&listOfVerticesP2[17]; //graphVertex(possibleposition[17]);
-			adjacentVertices[2]=&listOfVerticesP2[19]; //graphVertex(possibleposition[19]); //maybe a vector would be more suitable ?
+			
+			adjacentVertices[0]=&listOfVerticesP2[1]; 
+			adjacentVertices[1]=&listOfVerticesP2[17]; 
+			adjacentVertices[2]=&listOfVerticesP2[19]; 
 		}
 		else if(findpos(actuelposition,possibleposition[1])){
-			adjacentVertices[0]=&listOfVerticesP2[0]; //graphVertex(possibleposition[0]);
-			adjacentVertices[1]=&listOfVerticesP2[2]; //graphVertex(possibleposition[2]);
+			adjacentVertices[0]=&listOfVerticesP2[0]; 
+			adjacentVertices[1]=&listOfVerticesP2[2]; 
 		}
 		else if(findpos(actuelposition,possibleposition[2])){
-			adjacentVertices[0]=&listOfVerticesP2[1]; //graphVertex(possibleposition[1]);
-			adjacentVertices[1]=&listOfVerticesP2[3]; //graphVertex(possibleposition[3]);
+			adjacentVertices[0]=&listOfVerticesP2[1]; 
+			adjacentVertices[1]=&listOfVerticesP2[3]; 
 		}
 		else if(findpos(actuelposition,possibleposition[3])){
-			adjacentVertices[0]=&listOfVerticesP2[2]; //graphVertex(possibleposition[2]);
-			adjacentVertices[1]=&listOfVerticesP2[4]; //graphVertex(possibleposition[4]);
-			adjacentVertices[2]=&listOfVerticesP2[5]; //graphVertex(possibleposition[5]);
+			adjacentVertices[0]=&listOfVerticesP2[2]; 
+			adjacentVertices[1]=&listOfVerticesP2[4]; 
+			adjacentVertices[2]=&listOfVerticesP2[5]; 
 		}
 		else if(findpos(actuelposition,possibleposition[4])){
-			adjacentVertices[0]=&listOfVerticesP2[3]; //graphVertex(possibleposition[3]);
-			adjacentVertices[1]=&listOfVerticesP2[6]; //graphVertex(possibleposition[6]);
+			adjacentVertices[0]=&listOfVerticesP2[3]; 
+			adjacentVertices[1]=&listOfVerticesP2[6]; 
 		}
 		else if(findpos(actuelposition,possibleposition[5])){
-			adjacentVertices[0]=&listOfVerticesP2[3]; //graphVertex(possibleposition[3]);
-			adjacentVertices[1]=&listOfVerticesP2[7]; //graphVertex(possibleposition[7]);
+			adjacentVertices[0]=&listOfVerticesP2[3]; 
+			adjacentVertices[1]=&listOfVerticesP2[7]; 
 		}
 		else if(findpos(actuelposition,possibleposition[6])){
-			adjacentVertices[0]=&listOfVerticesP2[4]; //graphVertex(possibleposition[4]);
-			adjacentVertices[1]=&listOfVerticesP2[9]; //graphVertex(possibleposition[9]);
-			adjacentVertices[2]=&listOfVerticesP2[26]; //graphVertex(possibleposition[26]);
+			adjacentVertices[0]=&listOfVerticesP2[4]; 
+			adjacentVertices[1]=&listOfVerticesP2[9]; 
+			adjacentVertices[2]=&listOfVerticesP2[26]; 
 		}
 		else if(findpos(actuelposition,possibleposition[7])){
-			adjacentVertices[0]=&listOfVerticesP2[5]; //graphVertex(possibleposition[5]);
-			adjacentVertices[1]=&listOfVerticesP2[8]; //graphVertex(possibleposition[8]);
+			adjacentVertices[0]=&listOfVerticesP2[5]; 
+			adjacentVertices[1]=&listOfVerticesP2[8]; 
 		}
 		else if(findpos(actuelposition,possibleposition[8])){
-			adjacentVertices[0]=&listOfVerticesP2[7]; //graphVertex(possibleposition[7]);
-			adjacentVertices[1]=&listOfVerticesP2[9]; //graphVertex(possibleposition[9]);
+			adjacentVertices[0]=&listOfVerticesP2[7]; 
+			adjacentVertices[1]=&listOfVerticesP2[9]; 
 		}
 		else if(findpos(actuelposition,possibleposition[9])){
-			adjacentVertices[0]=&listOfVerticesP2[6]; //graphVertex(possibleposition[6]);
-			adjacentVertices[1]=&listOfVerticesP2[8]; //graphVertex(possibleposition[8]);
-			adjacentVertices[2]=&listOfVerticesP2[10]; //graphVertex(possibleposition[10]);
-			adjacentVertices[3]=&listOfVerticesP2[38]; //graphVertex(possibleposition[38]);
+			adjacentVertices[0]=&listOfVerticesP2[6]; 
+			adjacentVertices[1]=&listOfVerticesP2[8]; 
+			adjacentVertices[2]=&listOfVerticesP2[10]; 
+			adjacentVertices[3]=&listOfVerticesP2[38]; 
 		}
 		else if(findpos(actuelposition,possibleposition[10])){
-			adjacentVertices[0]=&listOfVerticesP2[9]; //graphVertex(possibleposition[9]);
-			adjacentVertices[1]=&listOfVerticesP2[11]; //graphVertex(possibleposition[11]);
-			adjacentVertices[2]=&listOfVerticesP2[45]; //graphVertex(possibleposition[45]);
+			adjacentVertices[0]=&listOfVerticesP2[9]; 
+			adjacentVertices[1]=&listOfVerticesP2[11]; 
+			adjacentVertices[2]=&listOfVerticesP2[45]; 
 		}
 		else if(findpos(actuelposition,possibleposition[11])){
-			adjacentVertices[0]=&listOfVerticesP2[10]; //graphVertex(possibleposition[10]);
-			adjacentVertices[1]=&listOfVerticesP2[12]; //graphVertex(possibleposition[12]);
-			adjacentVertices[2]=&listOfVerticesP2[13]; //graphVertex(possibleposition[13]);
+			adjacentVertices[0]=&listOfVerticesP2[10]; 
+			adjacentVertices[1]=&listOfVerticesP2[12]; 
+			adjacentVertices[2]=&listOfVerticesP2[13]; 
 		}
 		else if(findpos(actuelposition,possibleposition[12])){
-			adjacentVertices[0]=&listOfVerticesP2[11]; //graphVertex(possibleposition[11]);
-			adjacentVertices[1]=&listOfVerticesP2[14]; //graphVertex(possibleposition[14]);
+			adjacentVertices[0]=&listOfVerticesP2[11]; 
+			adjacentVertices[1]=&listOfVerticesP2[14]; 
 		}
 		else if(findpos(actuelposition,possibleposition[13])){
-			adjacentVertices[0]=&listOfVerticesP2[11]; //graphVertex(possibleposition[11]);
-			adjacentVertices[1]=&listOfVerticesP2[14]; //graphVertex(possibleposition[14]);
-			adjacentVertices[2]=&listOfVerticesP2[16]; //graphVertex(possibleposition[16]);
-			adjacentVertices[3]=&listOfVerticesP2[61]; //graphVertex(possibleposition[61]);
+			adjacentVertices[0]=&listOfVerticesP2[11]; 
+			adjacentVertices[1]=&listOfVerticesP2[14]; 
+			adjacentVertices[2]=&listOfVerticesP2[16]; 
+			adjacentVertices[3]=&listOfVerticesP2[61]; 
 		}
 		else if(findpos(actuelposition,possibleposition[14])){
-			adjacentVertices[0]=&listOfVerticesP2[12]; //graphVertex(possibleposition[12]);
-			adjacentVertices[1]=&listOfVerticesP2[13]; //graphVertex(possibleposition[13]);
-			adjacentVertices[2]=&listOfVerticesP2[15]; //graphVertex(possibleposition[15]);
+			adjacentVertices[0]=&listOfVerticesP2[12]; 
+			adjacentVertices[1]=&listOfVerticesP2[13]; 
+			adjacentVertices[2]=&listOfVerticesP2[15]; 
 		}
 		else if(findpos(actuelposition,possibleposition[15])){
-			adjacentVertices[0]=&listOfVerticesP2[14]; //graphVertex(possibleposition[14]);
-			adjacentVertices[1]=&listOfVerticesP2[16]; //graphVertex(possibleposition[16]);
+			adjacentVertices[0]=&listOfVerticesP2[14]; 
+			adjacentVertices[1]=&listOfVerticesP2[16]; 
 		}
 		else if(findpos(actuelposition,possibleposition[16])){
-			adjacentVertices[0]=&listOfVerticesP2[13]; //graphVertex(possibleposition[13]);
-			adjacentVertices[1]=&listOfVerticesP2[15]; //graphVertex(possibleposition[15]);
-			adjacentVertices[2]=&listOfVerticesP2[62]; //graphVertex(possibleposition[62]);
+			adjacentVertices[0]=&listOfVerticesP2[13]; 
+			adjacentVertices[1]=&listOfVerticesP2[15]; 
+			adjacentVertices[2]=&listOfVerticesP2[62]; 
 		}
 		else if(findpos(actuelposition,possibleposition[17])){
-			adjacentVertices[0]=&listOfVerticesP2[0]; //graphVertex(possibleposition[0]);
-			adjacentVertices[1]=&listOfVerticesP2[25]; //graphVertex(possibleposition[25]);
+			adjacentVertices[0]=&listOfVerticesP2[0]; 
+			adjacentVertices[1]=&listOfVerticesP2[25]; 
 		}
 		else if(findpos(actuelposition,possibleposition[18])){
-			adjacentVertices[0]=&listOfVerticesP2[19]; //graphVertex(possibleposition[19]);
-			adjacentVertices[1]=&listOfVerticesP2[24]; //graphVertex(possibleposition[24]);                
+			adjacentVertices[0]=&listOfVerticesP2[19]; 
+			adjacentVertices[1]=&listOfVerticesP2[24];                
 		}
 		else if(findpos(actuelposition,possibleposition[19])){
-			adjacentVertices[0]=&listOfVerticesP2[0]; //graphVertex(possibleposition[0]);
-			adjacentVertices[1]=&listOfVerticesP2[18]; //graphVertex(possibleposition[18]);
-			adjacentVertices[2]=&listOfVerticesP2[20]; //graphVertex(possibleposition[20]);
+			adjacentVertices[0]=&listOfVerticesP2[0]; 
+			adjacentVertices[1]=&listOfVerticesP2[18]; 
+			adjacentVertices[2]=&listOfVerticesP2[20]; 
 		}
 		else if(findpos(actuelposition,possibleposition[20])){
-			adjacentVertices[0]=&listOfVerticesP2[19]; //graphVertex(possibleposition[19]);
-			adjacentVertices[1]=&listOfVerticesP2[21]; //graphVertex(possibleposition[21]);
+			adjacentVertices[0]=&listOfVerticesP2[19]; 
+			adjacentVertices[1]=&listOfVerticesP2[21]; 
 		}
 		else if(findpos(actuelposition,possibleposition[21])){
-			adjacentVertices[0]=&listOfVerticesP2[20]; //graphVertex(possibleposition[20]);
-			adjacentVertices[1]=&listOfVerticesP2[22]; //graphVertex(possibleposition[22]);
+			adjacentVertices[0]=&listOfVerticesP2[20]; 
+			adjacentVertices[1]=&listOfVerticesP2[22]; 
 		}
 		else if(findpos(actuelposition,possibleposition[22])){
-			adjacentVertices[0]=&listOfVerticesP2[21]; //graphVertex(possibleposition[21]);
-			adjacentVertices[1]=&listOfVerticesP2[23]; //graphVertex(possibleposition[23]);
-			adjacentVertices[2]=&listOfVerticesP2[31]; //graphVertex(possibleposition[31]);
+			adjacentVertices[0]=&listOfVerticesP2[21]; 
+			adjacentVertices[1]=&listOfVerticesP2[23]; 
+			adjacentVertices[2]=&listOfVerticesP2[31]; 
 		}
 		else if(findpos(actuelposition,possibleposition[23])){
-			adjacentVertices[0]=&listOfVerticesP2[22]; //graphVertex(possibleposition[22]);
-			adjacentVertices[1]=&listOfVerticesP2[30]; //graphVertex(possibleposition[30]);
+			adjacentVertices[0]=&listOfVerticesP2[22]; 
+			adjacentVertices[1]=&listOfVerticesP2[30]; 
 		}
 		else if(findpos(actuelposition,possibleposition[24])){
-			adjacentVertices[0]=&listOfVerticesP2[18]; //graphVertex(possibleposition[18]);
-			adjacentVertices[1]=&listOfVerticesP2[29]; //graphVertex(possibleposition[29]);
+			adjacentVertices[0]=&listOfVerticesP2[18]; 
+			adjacentVertices[1]=&listOfVerticesP2[29]; 
 		}
 		else if(findpos(actuelposition,possibleposition[25])){
-			adjacentVertices[0]=&listOfVerticesP2[17]; //graphVertex(possibleposition[17]);
-			adjacentVertices[1]=&listOfVerticesP2[26]; //graphVertex(possibleposition[26]);
+			adjacentVertices[0]=&listOfVerticesP2[17]; 
+			adjacentVertices[1]=&listOfVerticesP2[26]; 
 		}
 		else if(findpos(actuelposition,possibleposition[26])){
-			adjacentVertices[0]=&listOfVerticesP2[6]; //graphVertex(possibleposition[6]);
-			adjacentVertices[1]=&listOfVerticesP2[25]; //graphVertex(possibleposition[25]);
-			adjacentVertices[2]=&listOfVerticesP2[27]; //graphVertex(possibleposition[27]);
+			adjacentVertices[0]=&listOfVerticesP2[6]; 
+			adjacentVertices[1]=&listOfVerticesP2[25]; 
+			adjacentVertices[2]=&listOfVerticesP2[27]; 
 		}
 		else if(findpos(actuelposition,possibleposition[27])){
-			adjacentVertices[0]=&listOfVerticesP2[26]; //graphVertex(possibleposition[26]);
-			adjacentVertices[1]=&listOfVerticesP2[28]; //graphVertex(possibleposition[28]);
-			adjacentVertices[2]=&listOfVerticesP2[37]; //graphVertex(possibleposition[37]);
+			adjacentVertices[0]=&listOfVerticesP2[26]; 
+			adjacentVertices[1]=&listOfVerticesP2[28]; 
+			adjacentVertices[2]=&listOfVerticesP2[37]; 
 		}
 		else if(findpos(actuelposition,possibleposition[28])){
-			adjacentVertices[0]=&listOfVerticesP2[27]; //graphVertex(possibleposition[27]);
-			adjacentVertices[1]=&listOfVerticesP2[29]; //graphVertex(possibleposition[29]);
-			adjacentVertices[2]=&listOfVerticesP2[36]; //graphVertex(possibleposition[36]);
+			adjacentVertices[0]=&listOfVerticesP2[27]; 
+			adjacentVertices[1]=&listOfVerticesP2[29]; 
+			adjacentVertices[2]=&listOfVerticesP2[36];
 		}
 		else if(findpos(actuelposition,possibleposition[29])){
-			adjacentVertices[0]=&listOfVerticesP2[24]; //graphVertex(possibleposition[24]);
-			adjacentVertices[1]=&listOfVerticesP2[28]; //graphVertex(possibleposition[28]);
-			adjacentVertices[2]=&listOfVerticesP2[30]; //graphVertex(possibleposition[30]);
+			adjacentVertices[0]=&listOfVerticesP2[24]; 
+			adjacentVertices[1]=&listOfVerticesP2[28]; 
+			adjacentVertices[2]=&listOfVerticesP2[30]; 
 		}
 		else if(findpos(actuelposition,possibleposition[30])){
-			adjacentVertices[0]=&listOfVerticesP2[23]; //graphVertex(possibleposition[23]);
-			adjacentVertices[1]=&listOfVerticesP2[29]; //graphVertex(possibleposition[29]);
-			adjacentVertices[2]=&listOfVerticesP2[34]; //graphVertex(possibleposition[34]);
+			adjacentVertices[0]=&listOfVerticesP2[23]; 
+			adjacentVertices[1]=&listOfVerticesP2[29]; 
+			adjacentVertices[2]=&listOfVerticesP2[34]; 
 		}
 		else if(findpos(actuelposition,possibleposition[31])){
-			adjacentVertices[0]=&listOfVerticesP2[22]; //graphVertex(possibleposition[22]);
-			adjacentVertices[1]=&listOfVerticesP2[32]; //graphVertex(possibleposition[32]);
+			adjacentVertices[0]=&listOfVerticesP2[22]; 
+			adjacentVertices[1]=&listOfVerticesP2[32]; 
 		}
 		else if(findpos(actuelposition,possibleposition[32])){
-			adjacentVertices[0]=&listOfVerticesP2[31]; //graphVertex(possibleposition[31]);
-			adjacentVertices[1]=&listOfVerticesP2[33]; //graphVertex(possibleposition[33]);
+			adjacentVertices[0]=&listOfVerticesP2[31]; 
+			adjacentVertices[1]=&listOfVerticesP2[33];
 		}
 		else if(findpos(actuelposition,possibleposition[33])){
-			adjacentVertices[0]=&listOfVerticesP2[32]; //graphVertex(possibleposition[32]);
-			adjacentVertices[1]=&listOfVerticesP2[34]; //graphVertex(possibleposition[34]);
+			adjacentVertices[0]=&listOfVerticesP2[32]; 
+			adjacentVertices[1]=&listOfVerticesP2[34];
 		}
 		else if(findpos(actuelposition,possibleposition[34])){
-			adjacentVertices[0]=&listOfVerticesP2[30]; //graphVertex(possibleposition[30]);
-			adjacentVertices[1]=&listOfVerticesP2[33]; //graphVertex(possibleposition[33]);
-			adjacentVertices[2]=&listOfVerticesP2[35]; //graphVertex(possibleposition[35]);
-			adjacentVertices[3]=&listOfVerticesP2[42]; //graphVertex(possibleposition[42]);
+			adjacentVertices[0]=&listOfVerticesP2[30]; 
+			adjacentVertices[1]=&listOfVerticesP2[33]; 
+			adjacentVertices[2]=&listOfVerticesP2[35]; 
+			adjacentVertices[3]=&listOfVerticesP2[42]; 
 
 		}
 		else if(findpos(actuelposition,possibleposition[35])){
-			adjacentVertices[0]=&listOfVerticesP2[34]; //graphVertex(possibleposition[34]);
-			adjacentVertices[1]=&listOfVerticesP2[36]; //graphVertex(possibleposition[36]);
-			adjacentVertices[2]=&listOfVerticesP2[41]; //graphVertex(possibleposition[41]);
+			adjacentVertices[0]=&listOfVerticesP2[34]; 
+			adjacentVertices[1]=&listOfVerticesP2[36]; 
+			adjacentVertices[2]=&listOfVerticesP2[41]; 
 		}
 		else if(findpos(actuelposition,possibleposition[36])){
-			adjacentVertices[0]=&listOfVerticesP2[28]; //graphVertex(possibleposition[28]);
-			adjacentVertices[1]=&listOfVerticesP2[35]; //graphVertex(possibleposition[35]);
+			adjacentVertices[0]=&listOfVerticesP2[28]; 
+			adjacentVertices[1]=&listOfVerticesP2[35]; 
 		}
 		else if(findpos(actuelposition,possibleposition[37])){
-			adjacentVertices[0]=&listOfVerticesP2[27]; //graphVertex(possibleposition[27]);
-			adjacentVertices[1]=&listOfVerticesP2[38]; //graphVertex(possibleposition[38]);
+			adjacentVertices[0]=&listOfVerticesP2[27]; 
+			adjacentVertices[1]=&listOfVerticesP2[38]; 
 		}
 		else if(findpos(actuelposition,possibleposition[38])){
-			adjacentVertices[0]=&listOfVerticesP2[9]; //graphVertex(possibleposition[9]);
-			adjacentVertices[1]=&listOfVerticesP2[37]; //graphVertex(possibleposition[37]);
-			adjacentVertices[2]=&listOfVerticesP2[39]; //graphVertex(possibleposition[39]);
+			adjacentVertices[0]=&listOfVerticesP2[9]; 
+			adjacentVertices[1]=&listOfVerticesP2[37]; 
+			adjacentVertices[2]=&listOfVerticesP2[39]; 
 		}
 		else if(findpos(actuelposition,possibleposition[39])){
-			adjacentVertices[0]=&listOfVerticesP2[38]; //graphVertex(possibleposition[38]);
-			adjacentVertices[1]=&listOfVerticesP2[40]; //graphVertex(possibleposition[40]);
-			adjacentVertices[2]=&listOfVerticesP2[45]; //graphVertex(possibleposition[45]);
+			adjacentVertices[0]=&listOfVerticesP2[38]; 
+			adjacentVertices[1]=&listOfVerticesP2[40]; 
+			adjacentVertices[2]=&listOfVerticesP2[45]; 
 		}
 		else if(findpos(actuelposition,possibleposition[40])){
-			adjacentVertices[0]=&listOfVerticesP2[39]; //graphVertex(possibleposition[39]);
-			adjacentVertices[1]=&listOfVerticesP2[41]; //graphVertex(possibleposition[41]);
+			adjacentVertices[0]=&listOfVerticesP2[39]; 
+			adjacentVertices[1]=&listOfVerticesP2[41]; 
 		}
 		else if(findpos(actuelposition,possibleposition[41])){
-			adjacentVertices[0]=&listOfVerticesP2[35]; //graphVertex(possibleposition[35]);
-			adjacentVertices[1]=&listOfVerticesP2[43]; //graphVertex(possibleposition[43]);
-			adjacentVertices[2]=&listOfVerticesP2[40]; //error meuh
+			adjacentVertices[0]=&listOfVerticesP2[35]; 
+			adjacentVertices[1]=&listOfVerticesP2[43]; 
+			adjacentVertices[2]=&listOfVerticesP2[40]; 
 		}
 		else if(findpos(actuelposition,possibleposition[42])){
-			adjacentVertices[0]=&listOfVerticesP2[34]; //graphVertex(possibleposition[34]);
-			adjacentVertices[1]=&listOfVerticesP2[43]; //graphVertex(possibleposition[43]);
-			adjacentVertices[2]=&listOfVerticesP2[54]; //graphVertex(possibleposition[54]);
+			adjacentVertices[0]=&listOfVerticesP2[34]; 
+			adjacentVertices[1]=&listOfVerticesP2[43]; 
+			adjacentVertices[2]=&listOfVerticesP2[54]; 
 		}
 		else if(findpos(actuelposition,possibleposition[43])){
-			adjacentVertices[0]=&listOfVerticesP2[41]; //graphVertex(possibleposition[41]);
-			adjacentVertices[1]=&listOfVerticesP2[46]; //graphVertex(possibleposition[46]);
-			adjacentVertices[2]=&listOfVerticesP2[42]; //error meuh
+			adjacentVertices[0]=&listOfVerticesP2[41]; 
+			adjacentVertices[1]=&listOfVerticesP2[46]; 
+			adjacentVertices[2]=&listOfVerticesP2[42]; 
 		}
 		else if(findpos(actuelposition,possibleposition[44])){
-			adjacentVertices[0]=&listOfVerticesP2[40]; //graphVertex(possibleposition[40]);
-			adjacentVertices[1]=&listOfVerticesP2[66]; //graphVertex(possibleposition[66]);
+			adjacentVertices[0]=&listOfVerticesP2[40]; 
+			adjacentVertices[1]=&listOfVerticesP2[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[45])){
-			adjacentVertices[0]=&listOfVerticesP2[10]; //graphVertex(possibleposition[10]);
-			adjacentVertices[1]=&listOfVerticesP2[39]; //graphVertex(possibleposition[39]);
-			adjacentVertices[2]=&listOfVerticesP2[49]; //graphVertex(possibleposition[49]);
+			adjacentVertices[0]=&listOfVerticesP2[10]; 
+			adjacentVertices[1]=&listOfVerticesP2[39];
+			adjacentVertices[2]=&listOfVerticesP2[49]; 
 		}
 		else if(findpos(actuelposition,possibleposition[46])){
-			adjacentVertices[0]=&listOfVerticesP2[43]; //graphVertex(possibleposition[43]);
-			adjacentVertices[1]=&listOfVerticesP2[47]; //graphVertex(possibleposition[47]);
+			adjacentVertices[0]=&listOfVerticesP2[43]; 
+			adjacentVertices[1]=&listOfVerticesP2[47]; 
 		}
 		else if(findpos(actuelposition,possibleposition[47])){
-			adjacentVertices[0]=&listOfVerticesP2[46]; //graphVertex(possibleposition[46]);
-			adjacentVertices[1]=&listOfVerticesP2[52]; //graphVertex(possibleposition[52]);
-			adjacentVertices[2]=&listOfVerticesP2[66]; //graphVertex(possibleposition[66]);
+			adjacentVertices[0]=&listOfVerticesP2[46]; 
+			adjacentVertices[1]=&listOfVerticesP2[52]; 
+			adjacentVertices[2]=&listOfVerticesP2[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[48])){
-			adjacentVertices[0]=&listOfVerticesP2[49]; //graphVertex(possibleposition[49]);
-			adjacentVertices[1]=&listOfVerticesP2[51]; //graphVertex(possibleposition[51]);
-			adjacentVertices[2]=&listOfVerticesP2[66]; //graphVertex(possibleposition[66]);
+			adjacentVertices[0]=&listOfVerticesP2[49]; 
+			adjacentVertices[1]=&listOfVerticesP2[51]; 
+			adjacentVertices[2]=&listOfVerticesP2[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[49])){
-			adjacentVertices[0]=&listOfVerticesP2[45]; //graphVertex(possibleposition[45]);
-			adjacentVertices[1]=&listOfVerticesP2[48]; //graphVertex(possibleposition[48]);
+			adjacentVertices[0]=&listOfVerticesP2[45]; 
+			adjacentVertices[1]=&listOfVerticesP2[48]; 
 		}
 		else if(findpos(actuelposition,possibleposition[50])){
-			adjacentVertices[0]=&listOfVerticesP2[51]; //graphVertex(possibleposition[51]);
-			adjacentVertices[1]=&listOfVerticesP2[61]; //graphVertex(possibleposition[61]);
+			adjacentVertices[0]=&listOfVerticesP2[51]; 
+			adjacentVertices[1]=&listOfVerticesP2[61]; 
 		}
 		else if(findpos(actuelposition,possibleposition[51])){
-			adjacentVertices[0]=&listOfVerticesP2[48]; //graphVertex(possibleposition[48]);
-			adjacentVertices[1]=&listOfVerticesP2[50]; //graphVertex(possibleposition[50]);
+			adjacentVertices[0]=&listOfVerticesP2[48]; 
+			adjacentVertices[1]=&listOfVerticesP2[50]; 
 		}
 		else if(findpos(actuelposition,possibleposition[52])){
-			adjacentVertices[0]=&listOfVerticesP2[47]; //graphVertex(possibleposition[47]);
-			adjacentVertices[1]=&listOfVerticesP2[53]; //graphVertex(possibleposition[53]);
+			adjacentVertices[0]=&listOfVerticesP2[47]; 
+			adjacentVertices[1]=&listOfVerticesP2[53]; 
 		}
 		else if(findpos(actuelposition,possibleposition[53])){
-			adjacentVertices[0]=&listOfVerticesP2[52]; //graphVertex(possibleposition[52]);
-			adjacentVertices[1]=&listOfVerticesP2[58]; //graphVertex(possibleposition[58]);
+			adjacentVertices[0]=&listOfVerticesP2[52]; 
+			adjacentVertices[1]=&listOfVerticesP2[58];
 		}
 		else if(findpos(actuelposition,possibleposition[54])){
-			adjacentVertices[0]=&listOfVerticesP2[42]; //graphVertex(possibleposition[42]);
-			adjacentVertices[1]=&listOfVerticesP2[55]; //graphVertex(possibleposition[55]);
-			adjacentVertices[2]=&listOfVerticesP2[57]; //graphVertex(possibleposition[57]);
+			adjacentVertices[0]=&listOfVerticesP2[42]; 
+			adjacentVertices[1]=&listOfVerticesP2[55]; 
+			adjacentVertices[2]=&listOfVerticesP2[57]; 
 		}
 		else if(findpos(actuelposition,possibleposition[55])){
-			adjacentVertices[0]=&listOfVerticesP2[54]; //graphVertex(possibleposition[54]);
-			adjacentVertices[1]=&listOfVerticesP2[56]; //graphVertex(possibleposition[56]);
+			adjacentVertices[0]=&listOfVerticesP2[54]; 
+			adjacentVertices[1]=&listOfVerticesP2[56]; 
 		}
 		else if(findpos(actuelposition,possibleposition[56])){
-			adjacentVertices[0]=&listOfVerticesP2[55]; //graphVertex(possibleposition[55]);
-			adjacentVertices[1]=&listOfVerticesP2[57]; //graphVertex(possibleposition[57]);
-			adjacentVertices[2]=&listOfVerticesP2[65]; //graphVertex(possibleposition[65]);
+			adjacentVertices[0]=&listOfVerticesP2[55]; 
+			adjacentVertices[1]=&listOfVerticesP2[57]; 
+			adjacentVertices[2]=&listOfVerticesP2[65]; 
 		}
 		else if(findpos(actuelposition,possibleposition[57])){
-			adjacentVertices[0]=&listOfVerticesP2[54]; //graphVertex(possibleposition[54]);
-			adjacentVertices[1]=&listOfVerticesP2[56]; //graphVertex(possibleposition[56]);
-			adjacentVertices[2]=&listOfVerticesP2[58]; //graphVertex(possibleposition[58]);
-			adjacentVertices[3]=&listOfVerticesP2[64]; //graphVertex(possibleposition[64]);
+			adjacentVertices[0]=&listOfVerticesP2[54]; 
+			adjacentVertices[1]=&listOfVerticesP2[56]; 
+			adjacentVertices[2]=&listOfVerticesP2[58]; 
+			adjacentVertices[3]=&listOfVerticesP2[64]; 
 
 		}
 		else if(findpos(actuelposition,possibleposition[58])){
-			adjacentVertices[0]=&listOfVerticesP2[53]; //graphVertex(possibleposition[53]);
-			adjacentVertices[1]=&listOfVerticesP2[57]; //graphVertex(possibleposition[57]);
-			adjacentVertices[2]=&listOfVerticesP2[59]; //graphVertex(possibleposition[59]);
+			adjacentVertices[0]=&listOfVerticesP2[53]; 
+			adjacentVertices[1]=&listOfVerticesP2[57]; 
+			adjacentVertices[2]=&listOfVerticesP2[59];
 		}
 		else if(findpos(actuelposition,possibleposition[59])){
-			adjacentVertices[0]=&listOfVerticesP2[58]; //graphVertex(possibleposition[58]);
-			adjacentVertices[1]=&listOfVerticesP2[60]; //graphVertex(possibleposition[59]);
-			adjacentVertices[2]=&listOfVerticesP2[63]; //graphVertex(possibleposition[63]);
+			adjacentVertices[0]=&listOfVerticesP2[58]; 
+			adjacentVertices[1]=&listOfVerticesP2[60]; 
+			adjacentVertices[2]=&listOfVerticesP2[63]; 
 		}
 		else if(findpos(actuelposition,possibleposition[60])){
-			adjacentVertices[0]=&listOfVerticesP2[59]; //graphVertex(possibleposition[59]);
-			adjacentVertices[1]=&listOfVerticesP2[61]; //graphVertex(possibleposition[61]);
-			adjacentVertices[2]=&listOfVerticesP2[62]; //graphVertex(possibleposition[62]);
+			adjacentVertices[0]=&listOfVerticesP2[59]; 
+			adjacentVertices[1]=&listOfVerticesP2[61]; 
+			adjacentVertices[2]=&listOfVerticesP2[62]; 
 		}
 		else if(findpos(actuelposition,possibleposition[61])){
-			adjacentVertices[0]=&listOfVerticesP2[13]; //graphVertex(possibleposition[13]);
-			adjacentVertices[1]=&listOfVerticesP2[50]; //graphVertex(possibleposition[50]);
-			adjacentVertices[2]=&listOfVerticesP2[60]; //graphVertex(possibleposition[60]);
+			adjacentVertices[0]=&listOfVerticesP2[13]; 
+			adjacentVertices[1]=&listOfVerticesP2[50]; 
+			adjacentVertices[2]=&listOfVerticesP2[60]; 
 		}
 		else if(findpos(actuelposition,possibleposition[62])){
-			adjacentVertices[0]=&listOfVerticesP2[16]; //graphVertex(possibleposition[16]);
-			adjacentVertices[1]=&listOfVerticesP2[60]; //graphVertex(possibleposition[60]);
+			adjacentVertices[0]=&listOfVerticesP2[16]; 
+			adjacentVertices[1]=&listOfVerticesP2[60]; 
 		}
 		else if(findpos(actuelposition,possibleposition[63])){
-			adjacentVertices[0]=&listOfVerticesP2[59]; //graphVertex(possibleposition[59]);
-			adjacentVertices[1]=&listOfVerticesP2[64]; //graphVertex(possibleposition[64]);
+			adjacentVertices[0]=&listOfVerticesP2[59]; 
+			adjacentVertices[1]=&listOfVerticesP2[64]; 
 		}
 		else if(findpos(actuelposition,possibleposition[64])){
-			adjacentVertices[0]=&listOfVerticesP2[57]; //graphVertex(possibleposition[57]);
-			adjacentVertices[1]=&listOfVerticesP2[63]; //graphVertex(possibleposition[63]);
-			adjacentVertices[2]=&listOfVerticesP2[65]; //graphVertex(possibleposition[65]);
+			adjacentVertices[0]=&listOfVerticesP2[57]; 
+			adjacentVertices[1]=&listOfVerticesP2[63]; 
+			adjacentVertices[2]=&listOfVerticesP2[65]; 
 		}
 		else if(findpos(actuelposition,possibleposition[65])){
-			adjacentVertices[0]=&listOfVerticesP2[56]; //graphVertex(possibleposition[56]);
-			adjacentVertices[1]=&listOfVerticesP2[64]; //graphVertex(possibleposition[64]);
+			adjacentVertices[0]=&listOfVerticesP2[56];
+			adjacentVertices[1]=&listOfVerticesP2[64];
 		}
 		else if(findpos(actuelposition,possibleposition[66])){
-			adjacentVertices[0]=&listOfVerticesP2[47]; //graphVertex(possibleposition[47]);
-			adjacentVertices[1]=&listOfVerticesP2[48]; //graphVertex(possibleposition[48]);
-		}
-	}
-
-	//functions taken from PacmanPink
-	///////////////////////
-
-
-
+			adjacentVertices[0]=&listOfVerticesP2[47];
+			adjacentVertices[1]=&listOfVerticesP2[48]; 
+		}
+	}
 
 
 	Vector3 PacmanGhost::frontPosition(){
+		//Should return the Vector3 point in front of the player. 
 
 		Vector3 neighborPos[4] = {Vector3(-1,-1,-1)};
@@ -777,5 +759,4 @@
 		}
 		else{
-			//std::cout<<frontPoint<<endl;
 			return frontPoint;
 		}
@@ -788,315 +769,316 @@
 
 	void PacmanGhost::findNeighboorPositions(Vector3 actuelposition, Vector3 adjacentPositions[], Vector3 positionArray[]){      
-		//this function should put in adjacentPosition[] the neighboors of lastPlayerPastPoint
+		//this function should put in adjacentPositions[] the neighboors of actuelposition.
+		// positionArray[] contains all possible positions of the map.
 
 		if(findpos(actuelposition,possibleposition[0])){
 
 
-			adjacentPositions[0]=positionArray[1]; //graphVertex(possibleposition[1]);  //need to do it everywhere !!!
-			adjacentPositions[1]=positionArray[17]; //graphVertex(possibleposition[17]);
-			adjacentPositions[2]=positionArray[19]; //graphVertex(possibleposition[19]); //maybe a vector would be more suitable ?
+			adjacentPositions[0]=positionArray[1];  
+			adjacentPositions[1]=positionArray[17]; 
+			adjacentPositions[2]=positionArray[19]; 
 		}
 		else if(findpos(actuelposition,possibleposition[1])){
-			adjacentPositions[0]=positionArray[0]; //graphVertex(possibleposition[0]);
-			adjacentPositions[1]=positionArray[2]; //graphVertex(possibleposition[2]);
+			adjacentPositions[0]=positionArray[0]; 
+			adjacentPositions[1]=positionArray[2]; 
 		}
 		else if(findpos(actuelposition,possibleposition[2])){
-			adjacentPositions[0]=positionArray[1]; //graphVertex(possibleposition[1]);
-			adjacentPositions[1]=positionArray[3]; //graphVertex(possibleposition[3]);
+			adjacentPositions[0]=positionArray[1]; 
+			adjacentPositions[1]=positionArray[3]; 
 		}
 		else if(findpos(actuelposition,possibleposition[3])){
-			adjacentPositions[0]=positionArray[2]; //graphVertex(possibleposition[2]);
-			adjacentPositions[1]=positionArray[4]; //graphVertex(possibleposition[4]);
-			adjacentPositions[2]=positionArray[5]; //graphVertex(possibleposition[5]);
+			adjacentPositions[0]=positionArray[2]; 
+			adjacentPositions[1]=positionArray[4]; 
+			adjacentPositions[2]=positionArray[5]; 
 		}
 		else if(findpos(actuelposition,possibleposition[4])){
-			adjacentPositions[0]=positionArray[3]; //graphVertex(possibleposition[3]);
-			adjacentPositions[1]=positionArray[6]; //graphVertex(possibleposition[6]);
+			adjacentPositions[0]=positionArray[3]; 
+			adjacentPositions[1]=positionArray[6]; 
 		}
 		else if(findpos(actuelposition,possibleposition[5])){
-			adjacentPositions[0]=positionArray[3]; //graphVertex(possibleposition[3]);
-			adjacentPositions[1]=positionArray[7]; //graphVertex(possibleposition[7]);
+			adjacentPositions[0]=positionArray[3]; 
+			adjacentPositions[1]=positionArray[7]; 
 		}
 		else if(findpos(actuelposition,possibleposition[6])){
-			adjacentPositions[0]=positionArray[4]; //graphVertex(possibleposition[4]);
-			adjacentPositions[1]=positionArray[9]; //graphVertex(possibleposition[9]);
-			adjacentPositions[2]=positionArray[26]; //graphVertex(possibleposition[26]);
+			adjacentPositions[0]=positionArray[4]; ;
+			adjacentPositions[1]=positionArray[9]; 
+			adjacentPositions[2]=positionArray[26]; 
 		}
 		else if(findpos(actuelposition,possibleposition[7])){
-			adjacentPositions[0]=positionArray[5]; //graphVertex(possibleposition[5]);
-			adjacentPositions[1]=positionArray[8]; //graphVertex(possibleposition[8]);
+			adjacentPositions[0]=positionArray[5]; 
+			adjacentPositions[1]=positionArray[8]; 
 		}
 		else if(findpos(actuelposition,possibleposition[8])){
-			adjacentPositions[0]=positionArray[7]; //graphVertex(possibleposition[7]);
-			adjacentPositions[1]=positionArray[9]; //graphVertex(possibleposition[9]);
+			adjacentPositions[0]=positionArray[7]; 
+			adjacentPositions[1]=positionArray[9]; 
 		}
 		else if(findpos(actuelposition,possibleposition[9])){
-			adjacentPositions[0]=positionArray[6]; //graphVertex(possibleposition[6]);
-			adjacentPositions[1]=positionArray[8]; //graphVertex(possibleposition[8]);
-			adjacentPositions[2]=positionArray[10]; //graphVertex(possibleposition[10]);
-			adjacentPositions[3]=positionArray[38]; //graphVertex(possibleposition[38]);
+			adjacentPositions[0]=positionArray[6]; 
+			adjacentPositions[1]=positionArray[8]; 
+			adjacentPositions[2]=positionArray[10]; 
+			adjacentPositions[3]=positionArray[38]; 
 		}
 		else if(findpos(actuelposition,possibleposition[10])){
-			adjacentPositions[0]=positionArray[9]; //graphVertex(possibleposition[9]);
-			adjacentPositions[1]=positionArray[11]; //graphVertex(possibleposition[11]);
-			adjacentPositions[2]=positionArray[45]; //graphVertex(possibleposition[45]);
+			adjacentPositions[0]=positionArray[9]; 
+			adjacentPositions[1]=positionArray[11]; 
+			adjacentPositions[2]=positionArray[45]; 
 		}
 		else if(findpos(actuelposition,possibleposition[11])){
-			adjacentPositions[0]=positionArray[10]; //graphVertex(possibleposition[10]);
-			adjacentPositions[1]=positionArray[12]; //graphVertex(possibleposition[12]);
-			adjacentPositions[2]=positionArray[13]; //graphVertex(possibleposition[13]);
+			adjacentPositions[0]=positionArray[10]; 
+			adjacentPositions[1]=positionArray[12]; 
+			adjacentPositions[2]=positionArray[13]; 
 		}
 		else if(findpos(actuelposition,possibleposition[12])){
-			adjacentPositions[0]=positionArray[11]; //graphVertex(possibleposition[11]);
-			adjacentPositions[1]=positionArray[14]; //graphVertex(possibleposition[14]);
+			adjacentPositions[0]=positionArray[11]; 
+			adjacentPositions[1]=positionArray[14]; 
 		}
 		else if(findpos(actuelposition,possibleposition[13])){
-			adjacentPositions[0]=positionArray[11]; //graphVertex(possibleposition[11]);
-			adjacentPositions[1]=positionArray[14]; //graphVertex(possibleposition[14]);
-			adjacentPositions[2]=positionArray[16]; //graphVertex(possibleposition[16]);
-			adjacentPositions[3]=positionArray[61]; //graphVertex(possibleposition[61]);
+			adjacentPositions[0]=positionArray[11]; 
+			adjacentPositions[1]=positionArray[14]; 
+			adjacentPositions[2]=positionArray[16]; 
+			adjacentPositions[3]=positionArray[61]; 
 		}
 		else if(findpos(actuelposition,possibleposition[14])){
-			adjacentPositions[0]=positionArray[12]; //graphVertex(possibleposition[12]);
-			adjacentPositions[1]=positionArray[13]; //graphVertex(possibleposition[13]);
-			adjacentPositions[2]=positionArray[15]; //graphVertex(possibleposition[15]);
+			adjacentPositions[0]=positionArray[12]; 
+			adjacentPositions[1]=positionArray[13]; 
+			adjacentPositions[2]=positionArray[15]; 
 		}
 		else if(findpos(actuelposition,possibleposition[15])){
-			adjacentPositions[0]=positionArray[14]; //graphVertex(possibleposition[14]);
-			adjacentPositions[1]=positionArray[16]; //graphVertex(possibleposition[16]);
+			adjacentPositions[0]=positionArray[14]; 
+			adjacentPositions[1]=positionArray[16]; 
 		}
 		else if(findpos(actuelposition,possibleposition[16])){
-			adjacentPositions[0]=positionArray[13]; //graphVertex(possibleposition[13]);
-			adjacentPositions[1]=positionArray[15]; //graphVertex(possibleposition[15]);
-			adjacentPositions[2]=positionArray[62]; //graphVertex(possibleposition[62]);
+			adjacentPositions[0]=positionArray[13]; 
+			adjacentPositions[1]=positionArray[15]; 
+			adjacentPositions[2]=positionArray[62]; 
 		}
 		else if(findpos(actuelposition,possibleposition[17])){
-			adjacentPositions[0]=positionArray[0]; //graphVertex(possibleposition[0]);
-			adjacentPositions[1]=positionArray[25]; //graphVertex(possibleposition[25]);
+			adjacentPositions[0]=positionArray[0]; 
+			adjacentPositions[1]=positionArray[25]; 
 		}
 		else if(findpos(actuelposition,possibleposition[18])){
-			adjacentPositions[0]=positionArray[19]; //graphVertex(possibleposition[19]);
-			adjacentPositions[1]=positionArray[24]; //graphVertex(possibleposition[24]);                
+			adjacentPositions[0]=positionArray[19]; 
+			adjacentPositions[1]=positionArray[24];                 
 		}
 		else if(findpos(actuelposition,possibleposition[19])){
-			adjacentPositions[0]=positionArray[0]; //graphVertex(possibleposition[0]);
-			adjacentPositions[1]=positionArray[18]; //graphVertex(possibleposition[18]);
-			adjacentPositions[2]=positionArray[20]; //graphVertex(possibleposition[20]);
+			adjacentPositions[0]=positionArray[0]; 
+			adjacentPositions[1]=positionArray[18]; 
+			adjacentPositions[2]=positionArray[20]; 
 		}
 		else if(findpos(actuelposition,possibleposition[20])){
-			adjacentPositions[0]=positionArray[19]; //graphVertex(possibleposition[19]);
-			adjacentPositions[1]=positionArray[21]; //graphVertex(possibleposition[21]);
+			adjacentPositions[0]=positionArray[19]; 
+			adjacentPositions[1]=positionArray[21]; 
 		}
 		else if(findpos(actuelposition,possibleposition[21])){
-			adjacentPositions[0]=positionArray[20]; //graphVertex(possibleposition[20]);
-			adjacentPositions[1]=positionArray[22]; //graphVertex(possibleposition[22]);
+			adjacentPositions[0]=positionArray[20]; 
+			adjacentPositions[1]=positionArray[22]; 
 		}
 		else if(findpos(actuelposition,possibleposition[22])){
-			adjacentPositions[0]=positionArray[21]; //graphVertex(possibleposition[21]);
-			adjacentPositions[1]=positionArray[23]; //graphVertex(possibleposition[23]);
-			adjacentPositions[2]=positionArray[31]; //graphVertex(possibleposition[31]);
+			adjacentPositions[0]=positionArray[21]; 
+			adjacentPositions[1]=positionArray[23]; 
+			adjacentPositions[2]=positionArray[31]; 
 		}
 		else if(findpos(actuelposition,possibleposition[23])){
-			adjacentPositions[0]=positionArray[22]; //graphVertex(possibleposition[22]);
-			adjacentPositions[1]=positionArray[30]; //graphVertex(possibleposition[30]);
+			adjacentPositions[0]=positionArray[22];
+			adjacentPositions[1]=positionArray[30]; 
 		}
 		else if(findpos(actuelposition,possibleposition[24])){
-			adjacentPositions[0]=positionArray[18]; //graphVertex(possibleposition[18]);
-			adjacentPositions[1]=positionArray[29]; //graphVertex(possibleposition[29]);
+			adjacentPositions[0]=positionArray[18]; 
+			adjacentPositions[1]=positionArray[29]; 
 		}
 		else if(findpos(actuelposition,possibleposition[25])){
-			adjacentPositions[0]=positionArray[17]; //graphVertex(possibleposition[17]);
-			adjacentPositions[1]=positionArray[26]; //graphVertex(possibleposition[26]);
+			adjacentPositions[0]=positionArray[17]; 
+			adjacentPositions[1]=positionArray[26]; 
 		}
 		else if(findpos(actuelposition,possibleposition[26])){
-			adjacentPositions[0]=positionArray[6]; //graphVertex(possibleposition[6]);
-			adjacentPositions[1]=positionArray[25]; //graphVertex(possibleposition[25]);
-			adjacentPositions[2]=positionArray[27]; //graphVertex(possibleposition[27]);
+			adjacentPositions[0]=positionArray[6]; 
+			adjacentPositions[1]=positionArray[25]; 
+			adjacentPositions[2]=positionArray[27]; 
 		}
 		else if(findpos(actuelposition,possibleposition[27])){
-			adjacentPositions[0]=positionArray[26]; //graphVertex(possibleposition[26]);
-			adjacentPositions[1]=positionArray[28]; //graphVertex(possibleposition[28]);
-			adjacentPositions[2]=positionArray[37]; //graphVertex(possibleposition[37]);
+			adjacentPositions[0]=positionArray[26]; 
+			adjacentPositions[1]=positionArray[28]; 
+			adjacentPositions[2]=positionArray[37]; 
 		}
 		else if(findpos(actuelposition,possibleposition[28])){
-			adjacentPositions[0]=positionArray[27]; //graphVertex(possibleposition[27]);
-			adjacentPositions[1]=positionArray[29]; //graphVertex(possibleposition[29]);
-			adjacentPositions[2]=positionArray[36]; //graphVertex(possibleposition[36]);
+			adjacentPositions[0]=positionArray[27]; 
+			adjacentPositions[1]=positionArray[29]; 
+			adjacentPositions[2]=positionArray[36]; 
 		}
 		else if(findpos(actuelposition,possibleposition[29])){
-			adjacentPositions[0]=positionArray[24]; //graphVertex(possibleposition[24]);
-			adjacentPositions[1]=positionArray[28]; //graphVertex(possibleposition[28]);
-			adjacentPositions[2]=positionArray[30]; //graphVertex(possibleposition[30]);
+			adjacentPositions[0]=positionArray[24]; 
+			adjacentPositions[1]=positionArray[28]; 
+			adjacentPositions[2]=positionArray[30]; 
 		}
 		else if(findpos(actuelposition,possibleposition[30])){
-			adjacentPositions[0]=positionArray[23]; //graphVertex(possibleposition[23]);
-			adjacentPositions[1]=positionArray[29]; //graphVertex(possibleposition[29]);
-			adjacentPositions[2]=positionArray[34]; //graphVertex(possibleposition[34]);
+			adjacentPositions[0]=positionArray[23]; 
+			adjacentPositions[1]=positionArray[29]; 
+			adjacentPositions[2]=positionArray[34]; 
 		}
 		else if(findpos(actuelposition,possibleposition[31])){
-			adjacentPositions[0]=positionArray[22]; //graphVertex(possibleposition[22]);
-			adjacentPositions[1]=positionArray[32]; //graphVertex(possibleposition[32]);
+			adjacentPositions[0]=positionArray[22]; 
+			adjacentPositions[1]=positionArray[32]; 
 		}
 		else if(findpos(actuelposition,possibleposition[32])){
-			adjacentPositions[0]=positionArray[31]; //graphVertex(possibleposition[31]);
-			adjacentPositions[1]=positionArray[33]; //graphVertex(possibleposition[33]);
+			adjacentPositions[0]=positionArray[31]; 
+			adjacentPositions[1]=positionArray[33]; 
 		}
 		else if(findpos(actuelposition,possibleposition[33])){
-			adjacentPositions[0]=positionArray[32]; //graphVertex(possibleposition[32]);
-			adjacentPositions[1]=positionArray[34]; //graphVertex(possibleposition[34]);
+			adjacentPositions[0]=positionArray[32]; 
+			adjacentPositions[1]=positionArray[34]; 
 		}
 		else if(findpos(actuelposition,possibleposition[34])){
-			adjacentPositions[0]=positionArray[30]; //graphVertex(possibleposition[30]);
-			adjacentPositions[1]=positionArray[33]; //graphVertex(possibleposition[33]);
-			adjacentPositions[2]=positionArray[35]; //graphVertex(possibleposition[35]);
-			adjacentPositions[3]=positionArray[42]; //graphVertex(possibleposition[42]);
+			adjacentPositions[0]=positionArray[30]; 
+			adjacentPositions[1]=positionArray[33]; 
+			adjacentPositions[2]=positionArray[35]; 
+			adjacentPositions[3]=positionArray[42]; 
 
 		}
 		else if(findpos(actuelposition,possibleposition[35])){
-			adjacentPositions[0]=positionArray[34]; //graphVertex(possibleposition[34]);
-			adjacentPositions[1]=positionArray[36]; //graphVertex(possibleposition[36]);
-			adjacentPositions[2]=positionArray[41]; //graphVertex(possibleposition[41]);
+			adjacentPositions[0]=positionArray[34]; 
+			adjacentPositions[1]=positionArray[36]; 
+			adjacentPositions[2]=positionArray[41]; 
 		}
 		else if(findpos(actuelposition,possibleposition[36])){
-			adjacentPositions[0]=positionArray[28]; //graphVertex(possibleposition[28]);
-			adjacentPositions[1]=positionArray[35]; //graphVertex(possibleposition[35]);
+			adjacentPositions[0]=positionArray[28]; 
+			adjacentPositions[1]=positionArray[35]; 
 		}
 		else if(findpos(actuelposition,possibleposition[37])){
-			adjacentPositions[0]=positionArray[27]; //graphVertex(possibleposition[27]);
-			adjacentPositions[1]=positionArray[38]; //graphVertex(possibleposition[38]);
+			adjacentPositions[0]=positionArray[27]; 
+			adjacentPositions[1]=positionArray[38]; 
 		}
 		else if(findpos(actuelposition,possibleposition[38])){
-			adjacentPositions[0]=positionArray[9]; //graphVertex(possibleposition[9]);
-			adjacentPositions[1]=positionArray[37]; //graphVertex(possibleposition[37]);
-			adjacentPositions[2]=positionArray[39]; //graphVertex(possibleposition[39]);
+			adjacentPositions[0]=positionArray[9]; 
+			adjacentPositions[1]=positionArray[37]; 
+			adjacentPositions[2]=positionArray[39]; 
 		}
 		else if(findpos(actuelposition,possibleposition[39])){
-			adjacentPositions[0]=positionArray[38]; //graphVertex(possibleposition[38]);
-			adjacentPositions[1]=positionArray[40]; //graphVertex(possibleposition[40]);
-			adjacentPositions[2]=positionArray[45]; //graphVertex(possibleposition[45]);
+			adjacentPositions[0]=positionArray[38]; 
+			adjacentPositions[1]=positionArray[40]; 
+			adjacentPositions[2]=positionArray[45]; 
 		}
 		else if(findpos(actuelposition,possibleposition[40])){
-			adjacentPositions[0]=positionArray[39]; //graphVertex(possibleposition[39]);
-			adjacentPositions[1]=positionArray[41]; //graphVertex(possibleposition[41]);
+			adjacentPositions[0]=positionArray[39]; 
+			adjacentPositions[1]=positionArray[41]; 
 		}
 		else if(findpos(actuelposition,possibleposition[41])){
-			adjacentPositions[0]=positionArray[35]; //graphVertex(possibleposition[35]);
-			adjacentPositions[1]=positionArray[43]; //graphVertex(possibleposition[43]);
-			adjacentPositions[2]=positionArray[40];  //error 
+			adjacentPositions[0]=positionArray[35]; 
+			adjacentPositions[1]=positionArray[43]; 
+			adjacentPositions[2]=positionArray[40];  
 		}
 		else if(findpos(actuelposition,possibleposition[42])){
-			adjacentPositions[0]=positionArray[34]; //graphVertex(possibleposition[34]);
-			adjacentPositions[1]=positionArray[43]; //graphVertex(possibleposition[43]);
-			adjacentPositions[2]=positionArray[54]; //graphVertex(possibleposition[54]);
+			adjacentPositions[0]=positionArray[34]; 
+			adjacentPositions[1]=positionArray[43]; 
+			adjacentPositions[2]=positionArray[54]; 
 		}
 		else if(findpos(actuelposition,possibleposition[43])){
-			adjacentPositions[0]=positionArray[41]; //graphVertex(possibleposition[41]);
-			adjacentPositions[1]=positionArray[46]; //graphVertex(possibleposition[46]);
-			adjacentPositions[2]=positionArray[42]; //error
+			adjacentPositions[0]=positionArray[41]; 
+			adjacentPositions[1]=positionArray[46]; 
+			adjacentPositions[2]=positionArray[42]; 
 		}
 		else if(findpos(actuelposition,possibleposition[44])){
-			adjacentPositions[0]=positionArray[40]; //graphVertex(possibleposition[40]);
-			adjacentPositions[1]=positionArray[66]; //graphVertex(possibleposition[66]);
+			adjacentPositions[0]=positionArray[40]; 
+			adjacentPositions[1]=positionArray[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[45])){
-			adjacentPositions[0]=positionArray[10]; //graphVertex(possibleposition[10]);
-			adjacentPositions[1]=positionArray[39]; //graphVertex(possibleposition[39]);
-			adjacentPositions[2]=positionArray[49]; //graphVertex(possibleposition[49]);
+			adjacentPositions[0]=positionArray[10]; 
+			adjacentPositions[1]=positionArray[39]; 
+			adjacentPositions[2]=positionArray[49]; 
 		}
 		else if(findpos(actuelposition,possibleposition[46])){
-			adjacentPositions[0]=positionArray[43]; //graphVertex(possibleposition[43]);
-			adjacentPositions[1]=positionArray[47]; //graphVertex(possibleposition[47]);
+			adjacentPositions[0]=positionArray[43]; 
+			adjacentPositions[1]=positionArray[47]; 
 		}
 		else if(findpos(actuelposition,possibleposition[47])){
-			adjacentPositions[0]=positionArray[46]; //graphVertex(possibleposition[46]);
-			adjacentPositions[1]=positionArray[52]; //graphVertex(possibleposition[52]);
-			adjacentPositions[2]=positionArray[66]; //graphVertex(possibleposition[66]);
+			adjacentPositions[0]=positionArray[46]; 
+			adjacentPositions[1]=positionArray[52]; 
+			adjacentPositions[2]=positionArray[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[48])){
-			adjacentPositions[0]=positionArray[49]; //graphVertex(possibleposition[49]);
-			adjacentPositions[1]=positionArray[51]; //graphVertex(possibleposition[51]);
-			adjacentPositions[2]=positionArray[66]; //graphVertex(possibleposition[66]);
+			adjacentPositions[0]=positionArray[49]; 
+			adjacentPositions[1]=positionArray[51]; 
+			adjacentPositions[2]=positionArray[66]; 
 		}
 		else if(findpos(actuelposition,possibleposition[49])){
-			adjacentPositions[0]=positionArray[45]; //graphVertex(possibleposition[45]);
-			adjacentPositions[1]=positionArray[48]; //graphVertex(possibleposition[48]);
+			adjacentPositions[0]=positionArray[45]; 
+			adjacentPositions[1]=positionArray[48]; 
 		}
 		else if(findpos(actuelposition,possibleposition[50])){
-			adjacentPositions[0]=positionArray[51]; //graphVertex(possibleposition[51]);
-			adjacentPositions[1]=positionArray[61]; //graphVertex(possibleposition[61]);
+			adjacentPositions[0]=positionArray[51]; 
+			adjacentPositions[1]=positionArray[61]; 
 		}
 		else if(findpos(actuelposition,possibleposition[51])){
-			adjacentPositions[0]=positionArray[48]; //graphVertex(possibleposition[48]);
-			adjacentPositions[1]=positionArray[50]; //graphVertex(possibleposition[50]);
+			adjacentPositions[0]=positionArray[48]; 
+			adjacentPositions[1]=positionArray[50]; 
 		}
 		else if(findpos(actuelposition,possibleposition[52])){
-			adjacentPositions[0]=positionArray[47]; //graphVertex(possibleposition[47]);
-			adjacentPositions[1]=positionArray[53]; //graphVertex(possibleposition[53]);
+			adjacentPositions[0]=positionArray[47]; 
+			adjacentPositions[1]=positionArray[53]; 
 		}
 		else if(findpos(actuelposition,possibleposition[53])){
-			adjacentPositions[0]=positionArray[52]; //graphVertex(possibleposition[52]);
-			adjacentPositions[1]=positionArray[58]; //graphVertex(possibleposition[58]);
+			adjacentPositions[0]=positionArray[52]; 
+			adjacentPositions[1]=positionArray[58]; 
 		}
 		else if(findpos(actuelposition,possibleposition[54])){
-			adjacentPositions[0]=positionArray[42]; //graphVertex(possibleposition[42]);
-			adjacentPositions[1]=positionArray[55]; //graphVertex(possibleposition[55]);
-			adjacentPositions[2]=positionArray[57]; //graphVertex(possibleposition[57]);
+			adjacentPositions[0]=positionArray[42]; 
+			adjacentPositions[1]=positionArray[55]; 
+			adjacentPositions[2]=positionArray[57]; 
 		}
 		else if(findpos(actuelposition,possibleposition[55])){
-			adjacentPositions[0]=positionArray[54]; //graphVertex(possibleposition[54]);
-			adjacentPositions[1]=positionArray[56]; //graphVertex(possibleposition[56]);
+			adjacentPositions[0]=positionArray[54]; 
+			adjacentPositions[1]=positionArray[56]; 
 		}
 		else if(findpos(actuelposition,possibleposition[56])){
-			adjacentPositions[0]=positionArray[55]; //graphVertex(possibleposition[55]);
-			adjacentPositions[1]=positionArray[57]; //graphVertex(possibleposition[57]);
-			adjacentPositions[2]=positionArray[65]; //graphVertex(possibleposition[65]);
+			adjacentPositions[0]=positionArray[55]; 
+			adjacentPositions[1]=positionArray[57]; 
+			adjacentPositions[2]=positionArray[65]; 
 		}
 		else if(findpos(actuelposition,possibleposition[57])){
-			adjacentPositions[0]=positionArray[54]; //graphVertex(possibleposition[54]);
-			adjacentPositions[1]=positionArray[56]; //graphVertex(possibleposition[56]);
-			adjacentPositions[2]=positionArray[58]; //graphVertex(possibleposition[58]);
-			adjacentPositions[3]=positionArray[64]; //graphVertex(possibleposition[64]);
+			adjacentPositions[0]=positionArray[54]; 
+			adjacentPositions[1]=positionArray[56]; 
+			adjacentPositions[2]=positionArray[58]; 
+			adjacentPositions[3]=positionArray[64]; 
 
 		}
 		else if(findpos(actuelposition,possibleposition[58])){
-			adjacentPositions[0]=positionArray[53]; //graphVertex(possibleposition[53]);
-			adjacentPositions[1]=positionArray[57]; //graphVertex(possibleposition[57]);
-			adjacentPositions[2]=positionArray[59]; //graphVertex(possibleposition[59]);
+			adjacentPositions[0]=positionArray[53]; 
+			adjacentPositions[1]=positionArray[57]; 
+			adjacentPositions[2]=positionArray[59]; 
 		}
 		else if(findpos(actuelposition,possibleposition[59])){
-			adjacentPositions[0]=positionArray[58]; //graphVertex(possibleposition[58]);
-			adjacentPositions[1]=positionArray[60]; //graphVertex(possibleposition[60]); //error 59
-			adjacentPositions[2]=positionArray[63]; //graphVertex(possibleposition[63]);
+			adjacentPositions[0]=positionArray[58]; 
+			adjacentPositions[1]=positionArray[60]; 
+			adjacentPositions[2]=positionArray[63]; 
 		}
 		else if(findpos(actuelposition,possibleposition[60])){
-			adjacentPositions[0]=positionArray[59]; //graphVertex(possibleposition[59]);
-			adjacentPositions[1]=positionArray[61]; //graphVertex(possibleposition[61]);
-			adjacentPositions[2]=positionArray[62]; //graphVertex(possibleposition[62]);
+			adjacentPositions[0]=positionArray[59]; 
+			adjacentPositions[1]=positionArray[61]; 
+			adjacentPositions[2]=positionArray[62]; 
 		}
 		else if(findpos(actuelposition,possibleposition[61])){
-			adjacentPositions[0]=positionArray[13]; //graphVertex(possibleposition[13]);
-			adjacentPositions[1]=positionArray[50]; //graphVertex(possibleposition[50]);
-			adjacentPositions[2]=positionArray[60]; //graphVertex(possibleposition[60]);
+			adjacentPositions[0]=positionArray[13]; 
+			adjacentPositions[1]=positionArray[50]; 
+			adjacentPositions[2]=positionArray[60]; 
 		}
 		else if(findpos(actuelposition,possibleposition[62])){
-			adjacentPositions[0]=positionArray[16]; //graphVertex(possibleposition[16]);
-			adjacentPositions[1]=positionArray[60]; //graphVertex(possibleposition[60]);
+			adjacentPositions[0]=positionArray[16]; 
+			adjacentPositions[1]=positionArray[60]; 
 		}
 		else if(findpos(actuelposition,possibleposition[63])){
-			adjacentPositions[0]=positionArray[59]; //graphVertex(possibleposition[59]);
-			adjacentPositions[1]=positionArray[64]; //graphVertex(possibleposition[64]);
+			adjacentPositions[0]=positionArray[59]; 
+			adjacentPositions[1]=positionArray[64]; 
 		}
 		else if(findpos(actuelposition,possibleposition[64])){
-			adjacentPositions[0]=positionArray[57]; //graphVertex(possibleposition[57]);
-			adjacentPositions[1]=positionArray[63]; //graphVertex(possibleposition[63]);
-			adjacentPositions[2]=positionArray[65]; //graphVertex(possibleposition[65]);
+			adjacentPositions[0]=positionArray[57]; 
+			adjacentPositions[1]=positionArray[63]; 
+			adjacentPositions[2]=positionArray[65]; 
 		}
 		else if(findpos(actuelposition,possibleposition[65])){
-			adjacentPositions[0]=positionArray[56]; //graphVertex(possibleposition[56]);
-			adjacentPositions[1]=positionArray[64]; //graphVertex(possibleposition[64]);
+			adjacentPositions[0]=positionArray[56]; 
+			adjacentPositions[1]=positionArray[64]; 
 		}
 		else if(findpos(actuelposition,possibleposition[66])){
-			adjacentPositions[0]=positionArray[47]; //graphVertex(possibleposition[47]);
-			adjacentPositions[1]=positionArray[48]; //graphVertex(possibleposition[48]);
+			adjacentPositions[0]=positionArray[47]; 
+			adjacentPositions[1]=positionArray[48]; 
 		}
 	}
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h	(revision 12357)
@@ -37,5 +37,4 @@
 
 #include "Pacman.h"
-//#include "GetShortestPathAlgorithm.h"
 
 namespace orxonox {
@@ -64,6 +63,5 @@
             virtual void changewith(PacmanGhost* otherghost);
             virtual void levelupvelo();
-
-            //bool findpos(Vector3 one, Vector3 other);      
+      
             virtual void changemovability();
             bool dontmove = false;
@@ -81,9 +79,6 @@
             bool lockmove = false;
 
-        /*Vector3 getShortestPath(Vector3 start, Vector3 goal);
 
-        Vector3 setPureArrayPos(Vector3 &posToSet);
-
-        */Vector3 getPlayerPos();
+        Vector3 getPlayerPos();
 
         Vector3 playerPos;
@@ -92,21 +87,9 @@
 
         Vector3 pointInFrontOfPlayer;
+        
         /*
-
-
-        //Vector3 pathAlgorithm;
-
     public: //HACK
-
     */
 
-    /*struct graphVertex;
-    void findNeighboorVertices(Vector3 actuelposition, graphVertex* adjacentVertices[], graphVertex listOfVerticesP2[]);
-    void updateShortestDistanceToStart(graphVertex &vertex, graphVertex &neighboor);
-    void findNearestNonVisitedNeighboor (graphVertex &vertex);
-    int graphDistance(Vector3 start, Vector3 goal);
-
-    graphVertex* findNextVertexToConsider(graphVertex listOfVerticesP[]);
-    Vector3 getShortestPath(Vector3 start, Vector3 goal);*/
 
     struct graphVertex;
@@ -119,7 +102,4 @@
     Vector3 getShortestPath(Vector3 start, Vector3 goal, Vector3 pointToAvoidP1=Vector3(0,0,0));
 
-
-
-    //functions taken from PacmanPink
 
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc	(revision 12357)
@@ -16,5 +16,5 @@
         this->target_x=0;
         this->target_z=15;
-        this->lastPlayerPassedPoint=Vector3(0,0,0); //Vector3(70,10,-135);
+        this->lastPlayerPassedPoint=Vector3(0,0,0); 
         this->pointInFrontOfPlayer=Vector3(0,0,0);
           
@@ -34,8 +34,5 @@
     {
         SUPER(PacmanGhost, tick, dt);
-
         this->actuelposition = this->getPosition();
-        //std::cout<<this->actuelposition<<endl;
-
 
         for(int u=0; u < 67; u++){//always check if player passed a point
@@ -45,6 +42,5 @@
             }
 
-        this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
-
+        this->pointInFrontOfPlayer=frontPosition(); 
         Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
         
@@ -74,10 +70,7 @@
         }
         else if(this->pointInFrontOfPlayer==Vector3(0,0,0)){
-            std::cout<<"arheeuuuu"<<endl;
 
             Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
-
             setNewTargetGhost(getShortestPath(pinkPos, this->lastPlayerPassedPoint));
-
 
         }
@@ -86,18 +79,7 @@
             while(lockmove){};
             lockmove = true;
-
-            //this->pointInFrontOfPlayer=getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
-            
             nextMove(pinkPos, pointInFrontOfPlayer, lastPlayerPassedPoint);
-
-
             lockmove=false;
-
         }
-
-
-
-
-
 	}
 
@@ -108,34 +90,17 @@
         Vector3 nextTarget;
 
-        /*std::cout<<this->actuelposition<<endl;
-        std::cout<<pinkPosP<<endl;
-        std::cout<<playerPos<<endl;
-        std::cout<<pointToAvoidP11<<endl;
-        std::cout<<this->getPlayerPos()<<endl;*/
-        std::cout<<playerPos<<endl;
-        std::cout<<"kok"<<endl;
-
         if(playerPos==pointToAvoidP11){ //SIGSEV if playerPos==pointToAvoidP11 otherwise
             nextTarget = getShortestPath(pinkPosP, playerPos);
         }
-        /*else if(pinkPosP==pointToAvoidP11){
-            nextTarget=getShortestPath(pinkPosP, playerPos);
-        }*/
-        else if((playerPos==Vector3(-70,10,-35))/*||(playerPos==Vector3(-20,10,-35))||(playerPos==Vector3(0,10,-35))*/){
-            //nextTarget=pinkPosP;
+        else if(playerPos==Vector3(-70,10,-35)){
+            
         nextTarget=getShortestPath(pinkPosP, Vector3(-70,10,-35));
-        std::cout<<"ChaillyVillage"<<endl;
+        
         }
-        /*else if((playerPos==Vector3(-70,10,-35))&&(pinkPosP==Vector3(-70,10,60))/*||(playerPos==Vector3(-20,10,-35))||(playerPos==Vector3(0,10,-35))){
-            //nextTarget=pinkPosP;
-        nextTarget=getShortestPath(pinkPosP, Vector3(-70,10,-35));
-        std::cout<<"ChaillyVillage"<<endl;
-        }*/
-        else{
-            //bugs here
-            std::cout<<pinkPosP<<endl;
+        else{   
+        
         nextTarget = getShortestPath(pinkPosP, playerPos, pointToAvoidP11);
         }
-        std::cout<<nextTarget<<endl;
+        
        setNewTargetGhost(nextTarget);
     }
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.h	(revision 12357)
@@ -4,5 +4,4 @@
 
 #include "PacmanGhost.h"
-//#include "getShortestPath.h"
 
 
@@ -18,14 +17,4 @@
   			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
-  			//void setNewTargetPink(Vector3 goalToGo);
-
-  			//void nextMove(Vector3 playerPos, Vector3 redPos);
-
-  			//int findPlayerTravDir (Vector3 playerPosBefore, Vector3 playerPos);
-
-  			//Vector3 getPointInFrontOfPacman(Vector3 pacLasVisPos,int indexForSWNE);
-
-  			//Vector3 diffVector (Vector3 start, Vector3 goal);
-
         Vector3 pinkPos;
 
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRandom.h	(revision 12357)
@@ -7,4 +7,6 @@
 
   class _OrxonoxExport PacmanRandom : public PacmanGhost{
+    //This class is not used anymore in the game, given that all 4 Ghosts now have
+    //their own behavior. But it could maybe still be useful.
 
   		public:
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.cc
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.cc	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.cc	(revision 12357)
@@ -1,4 +1,3 @@
 #include "PacmanRed.h"
-//#include "Pacman.h"
 
 #include "core/CoreIncludes.h"
@@ -16,5 +15,5 @@
         this->target_x=0;
         this->target_z=15;
-        this->lastPlayerPassedPoint=Vector3(0,0,0); //Vector3(70,10,-135);
+        this->lastPlayerPassedPoint=Vector3(0,0,0); 
         this->isNearPlayer=false;
           
@@ -31,13 +30,6 @@
     }
 
-    /*void PacmanRed::setPlayerPos(Vector3 _playerPos)
-    {
-        this->playerPos = _playerPos;
-    }*/
-
-
     void PacmanRed::tick(float dt)
     {
-        //std::cout<<"LemanExpress5"<<endl;
         SUPER(PacmanGhost, tick, dt);
 
@@ -45,21 +37,14 @@
 
         for(int u=0; u < 67; u++){//always check if player passed a point
-            //if(possibleposition[u]!=Vector3(0,10,15)){
+            
                 if(jeanfindpos(this->getPlayerPos(), possibleposition[u])){
-                    //if(!findpos(possibleposition[u],Vector3(0,10,15))){
+                    
                 this->lastPlayerPassedPoint=possibleposition[u];
-                            }
-                        //}
-                //}
+                            }    
             }
-
-            std::cout<<this->lastPlayerPassedPoint<<endl;
-            std::cout<<this->pointInFrontOfPlayer<<endl;
-
-
 
         //Stop, if target arrived
         if((abs(this->actuelposition.x - this->target_x)<0.5) && (abs(this->actuelposition.z - this->target_z)<0.5)){
-            //std::cout<<"LemanExpress1"<<endl;
+            
                  this->ismoving = false;
         }
@@ -67,5 +52,5 @@
         //Move, if ghost hasn't arrived yet
         if(this->ismoving){
-            //std::cout<<"LemanExpress2"<<endl;
+            
             if(!(abs(this->actuelposition.z-target_z)<0.5)) {
                 velocity = Vector3(0,0,-sgn(this->actuelposition.z-this->target_z));
@@ -76,5 +61,5 @@
                 move(dt, actuelposition, velocity);
             }
-            //std::cout<<"LemanExpress4"<<endl;
+        
         }
         else if(this->lastPlayerPassedPoint==Vector3(0,0,0)){
@@ -89,5 +74,4 @@
         //Check on which position the ghost has arrived and set new target
         else{
-            std::cout<<"LemanExpress3"<<endl;
 
             while(lockmove){};
@@ -98,32 +82,14 @@
 
             Vector3 redPos=Vector3(this->target_x, 10, this->target_z);
-            //nextMove(this->getPlayerPos(), redPos);
-
-            this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
-
+            this->pointInFrontOfPlayer=frontPosition(); 
 
             if(!findpos(this->actuelposition, lastPlayerPassedPoint)){
                 
-                /*std::cout<<this->getPlayerPos()<<endl;
-                std::cout<<this->lastPlayerPassedPoint<<endl;
-                std::cout<<this->pointInFrontOfPlayer<<endl;
-                std::cout<<this->actuelposition<<endl;*/
             nextMove(redPos, lastPlayerPassedPoint);
-            std::cout<<"hiuddi"<<endl;
             }
             else if(findpos(this->actuelposition, lastPlayerPassedPoint)){// red pacman is at lastPlayerPassedPoint
 
-                /*std::cout<<"dhdidjop"<<endl;
-                std::cout<<this->getPlayerPos()<<endl;
-                std::cout<<this->lastPlayerPassedPoint<<endl;
-                std::cout<<this->pointInFrontOfPlayer<<endl;
-                std::cout<<this->actuelposition<<endl;*/
-
-                //if(!findpos(pointInFrontOfPlayer, Vector3(0,10,15))){
-                nextMove(lastPlayerPassedPoint, pointInFrontOfPlayer);
-                    //}
-                std::cout<<"ogslodm"<<endl;
+            nextMove(lastPlayerPassedPoint, pointInFrontOfPlayer); 
             }
-
 
             lockmove=false; //NEVER FORGET THIS ONE !!!!!!!
Index: /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.h
===================================================================
--- /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.h	(revision 12356)
+++ /code/branches/3DPacman_FS19/src/modules/pacman/PacmanRed.h	(revision 12357)
@@ -4,5 +4,4 @@
 
 #include "PacmanGhost.h"
-//#include "getShortestPath.h"
 
 
