Skip to content

Commit ca534f1

Browse files
authored
Merge pull request #2 from parth-sh/main
2 parents 128166f + 67f5cc4 commit ca534f1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ void initNodes(vector<Node>& nodes, T arr) {
5757
}
5858

5959
int main() {
60+
#ifdef _WIN32
6061
system("title A* pathfinding");
62+
#else
63+
printf("\033]0;A* pathfinding\a");
64+
#endif
6165

6266
Pathfinder pathfinder;
6367
vector<Node> nodes;
@@ -91,7 +95,11 @@ int main() {
9195
};
9296

9397
initNodes(nodes, grid);
98+
#ifdef _WIN32
9499
system("pause");
100+
#else
101+
system("read -p 'Press Enter to continue...'");
102+
#endif
95103

96104
// size of board 25 x 25 ( 0 - 24, 0 - 24)
97105

@@ -104,7 +112,11 @@ int main() {
104112

105113
printNodes(nodes, start_node, end_node);
106114

115+
#ifdef _WIN32
107116
system("pause");
117+
#else
118+
system("read -p 'Press Enter to continue...'");
119+
#endif
108120
return 0;
109121
}
110122

0 commit comments

Comments
 (0)