Skip to content

Commit

Permalink
Error on missing .level file
Browse files Browse the repository at this point in the history
  • Loading branch information
FLAK-ZOSO committed Aug 20, 2023
1 parent 136f776 commit 7937d12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file modified fullkning
Binary file not shown.
9 changes: 9 additions & 0 deletions fullkning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ void stopStoneFalling() {

void fillFromLevelFile(std::string path) {
std::ifstream file(path, std::ios::in);
if (!file.is_open()) {
std::cerr << "Error while opening the file " << path << std::endl;
#if defined(_WIN32) or defined(__linux__)
getch();
#elif __APPLE__
getchar();
#endif
exit(1);
}
unsigned int y, x;
while (file >> y >> x) {
game::targets.push_back(new sista::Coordinates(y, x));
Expand Down

0 comments on commit 7937d12

Please sign in to comment.