Fix pos issue

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
sigonasr2, Sig, Sigo 2022-12-16 19:35:28 +00:00
parent f6e658150f
commit 3f301b34f6
2 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@ -58,6 +58,7 @@ void printArr(std::vector<std::string> a, int n){
flowTotal+=flowRate; flowTotal+=flowRate;
if (moveAmt1==0){ if (moveAmt1==0){
//We open the valve. Then move to the next one. //We open the valve. Then move to the next one.
currentPos=movePlan1[currentMarker1];
flowRate+=rooms[movePlan1[currentMarker1++]].flowValue; flowRate+=rooms[movePlan1[currentMarker1++]].flowValue;
if (currentMarker1<movePlan1.size()){ if (currentMarker1<movePlan1.size()){
moveAmt1=rooms[currentPos].paths[movePlan1[currentMarker1]]; moveAmt1=rooms[currentPos].paths[movePlan1[currentMarker1]];
@ -65,6 +66,7 @@ void printArr(std::vector<std::string> a, int n){
} }
if (moveAmt2==0){ if (moveAmt2==0){
//We open the valve. Then move to the next one. //We open the valve. Then move to the next one.
currentPos2=movePlan2[currentMarker2];
flowRate+=rooms[movePlan2[currentMarker2++]].flowValue; flowRate+=rooms[movePlan2[currentMarker2++]].flowValue;
if (currentMarker2<movePlan2.size()){ if (currentMarker2<movePlan2.size()){
moveAmt2=rooms[currentPos2].paths[movePlan1[currentMarker2]]; moveAmt2=rooms[currentPos2].paths[movePlan1[currentMarker2]];