Fix pos issue

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2, Sig, Sigo 2 years ago
parent f6e658150f
commit 3f301b34f6
  1. BIN
      C++ProjectTemplate
  2. 2
      main.cpp

Binary file not shown.

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

Loading…
Cancel
Save