Changeset 12326 for code/branches/3DPacman_FS19
- Timestamp:
- May 2, 2019, 1:00:11 PM (6 years ago)
- Location:
- code/branches/3DPacman_FS19/src/modules/pacman
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.cc
r12325 r12326 260 260 261 261 //(optional parameter) pointToAvoidP1 is a point that cannot be considered 262 262 263 263 264 264 graphVertex listOfVerticesM[67]; //our list of all possible graphs … … 619 619 adjacentVertices[0]=&listOfVerticesP2[35]; //graphVertex(possibleposition[35]); 620 620 adjacentVertices[1]=&listOfVerticesP2[43]; //graphVertex(possibleposition[43]); 621 adjacentVertices[2]=&listOfVerticesP2[40]; //error meuh 621 622 } 622 623 else if(findpos(actuelposition,possibleposition[42])){ … … 628 629 adjacentVertices[0]=&listOfVerticesP2[41]; //graphVertex(possibleposition[41]); 629 630 adjacentVertices[1]=&listOfVerticesP2[46]; //graphVertex(possibleposition[46]); 631 adjacentVertices[2]=&listOfVerticesP2[42]; //error meuh 630 632 } 631 633 else if(findpos(actuelposition,possibleposition[44])){ … … 1219 1221 1220 1222 } 1221 std::cout<<"bra"<<frontPoint<<endl;1222 1223 } 1223 1224 … … 1227 1228 } 1228 1229 else{ 1229 std::cout<<frontPoint<<endl;1230 //std::cout<<frontPoint<<endl; 1230 1231 return frontPoint; 1231 1232 } … … 1433 1434 adjacentPositions[0]=positionArray[35]; //graphVertex(possibleposition[35]); 1434 1435 adjacentPositions[1]=positionArray[43]; //graphVertex(possibleposition[43]); 1436 adjacentPositions[2]=positionArray[40]; //error 1435 1437 } 1436 1438 else if(findpos(actuelposition,possibleposition[42])){ … … 1442 1444 adjacentPositions[0]=positionArray[41]; //graphVertex(possibleposition[41]); 1443 1445 adjacentPositions[1]=positionArray[46]; //graphVertex(possibleposition[46]); 1446 adjacentPositions[2]=positionArray[42]; //error 1444 1447 } 1445 1448 else if(findpos(actuelposition,possibleposition[44])){ … … 1514 1517 else if(findpos(actuelposition,possibleposition[59])){ 1515 1518 adjacentPositions[0]=positionArray[58]; //graphVertex(possibleposition[58]); 1516 adjacentPositions[1]=positionArray[ 59]; //graphVertex(possibleposition[59]);1519 adjacentPositions[1]=positionArray[60]; //graphVertex(possibleposition[60]); //error 59 1517 1520 adjacentPositions[2]=positionArray[63]; //graphVertex(possibleposition[63]); 1518 1521 } -
code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc
r12325 r12326 36 36 37 37 this->actuelposition = this->getPosition(); 38 //std::cout<<this->actuelposition<<endl; 38 39 39 40 … … 46 47 int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos()); 47 48 this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV); 48 std::cout<<this->pointInFrontOfPlayer<<endl; 49 std::cout<<this->lastPlayerPassedPoint<<endl; 49 //std::cout<<this->pointInFrontOfPlayer<<endl; 50 //std::cout<<this->lastPlayerPassedPoint<<endl; 51 52 Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z); 53 //std::cout<<pinkPos<<endl; 50 54 51 55 //Stop, if target arrived … … 87 91 lockmove = true; 88 92 89 Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z); 93 //Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z); 94 //std::cout<<pinkPos<<endl; 90 95 91 96 //int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos()); … … 114 119 Vector3 nextTarget; 115 120 121 std::cout<<this->actuelposition<<endl; 122 std::cout<<pinkPosP<<endl; 123 std::cout<<playerPos<<endl; 124 std::cout<<pointToAvoidP11<<endl; 125 std::cout<<this->getPlayerPos()<<endl; 126 116 127 if(playerPos==pointToAvoidP11){ //SIGSEV if playerPos==pointToAvoidP11 otherwise 117 128 nextTarget = getShortestPath(pinkPosP, playerPos); 118 129 } 130 /*else if(pinkPosP==pointToAvoidP11){ 131 nextTarget=getShortestPath(pinkPosP, playerPos); 132 }*/ 119 133 else{ 134 //bugs here 135 std::cout<<"msjiowjqiq"<<endl; 120 136 nextTarget = getShortestPath(pinkPosP, playerPos, pointToAvoidP11); 121 137 }
Note: See TracChangeset
for help on using the changeset viewer.