generated from sigonasr2/CPlusPlusProjectTemplate
Part 1 complete!
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
85eca18a60
commit
f4b2b905ca
Binary file not shown.
3
main.cpp
3
main.cpp
@ -21,7 +21,7 @@ int main()
|
||||
std::vector<std::vector<char>>map;
|
||||
std::vector<Instruction>instructions;
|
||||
std::vector<vi2d>visitedLocs;
|
||||
std::ifstream file("testinput");
|
||||
std::ifstream file("input");
|
||||
while (file.good()){
|
||||
std::string line;
|
||||
std::getline(file,line);
|
||||
@ -130,7 +130,6 @@ int main()
|
||||
if (pos.x-1<0||map[pos.y][pos.x-1]==' '){
|
||||
if (map[pos.y][map[pos.y].size()-1]=='.'){
|
||||
targetPos.x=map[pos.y].size()-1;
|
||||
break;
|
||||
} else
|
||||
if (map[pos.y][map[pos.y].size()-1]=='#'){
|
||||
//It's a dead end so we can't move. Go next.
|
||||
|
Loading…
x
Reference in New Issue
Block a user