-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2703291
commit 670bd3a
Showing
12 changed files
with
63 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "Exceptions.h" | ||
|
||
const char* PlayerOutOfBoundException::what() const noexcept { | ||
return "Player is out of bound"; | ||
} | ||
|
||
const char* RandomException::what() const noexcept { | ||
return "Random exception"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
|
||
class PlayerOutOfBoundException : public std::exception { | ||
public: | ||
[[nodiscard]] const char* what() const noexcept override; | ||
}; | ||
|
||
class RandomException : public std::exception { | ||
This comment has been minimized.
Sorry, something went wrong.
mcmarius
|
||
public: | ||
[[nodiscard]] const char* what() const noexcept override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
#include <time.h> | ||
|
||
#include "./doodle_jump/game/Game.h" | ||
#include "./doodle_jump/exceptions/Exceptions.h" | ||
|
||
#ifdef __linux__ | ||
#include <X11/Xlib.h> | ||
|
@@ -16,6 +17,12 @@ int main() { | |
|
||
srand(time(NULL)); | ||
|
||
try { | ||
throw RandomException(); | ||
This comment has been minimized.
Sorry, something went wrong.
mcmarius
|
||
} catch (const std::exception& e) { | ||
std::cout << e.what() << '\n'; | ||
} | ||
|
||
Game game = Game(); | ||
std::cout << game << '\n'; | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Empty file.
Poți să lași așa, dar pe viitor ți-aș recomanda din motive de "marketing" să nu pui astfel de secțiuni în prim plan: ai vrea să te lauzi cu ce merge, nu cu ce nu merge