Part 1 complete!

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 85eca18a60
commit f4b2b905ca
  1. BIN
      C++ProjectTemplate
  2. 3
      main.cpp
  3. 2
      testinput

Binary file not shown.

@ -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.

@ -11,4 +11,4 @@
.#......
......#.
10L5L5L10L4L5L5
10R5L5R10L4R5L5
Loading…
Cancel
Save