generated from sigonasr2/CPlusPlusProjectTemplate
Fix pos issue
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
f6e658150f
commit
3f301b34f6
Binary file not shown.
2
main.cpp
2
main.cpp
@ -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]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user