Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed macro def from Symon game #20

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion games/017_Symon/project.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name=symon
dependencies.hackerpet=0.2.2
dependencies.hackerpet=0.2.3
22 changes: 0 additions & 22 deletions games/017_Symon/src/symon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@
#include <hackerpet.h>
#include <algorithm>


/* Yield Sleep milliseconds with timeout
*
* Waits for the specified number of milliseconds, yielding while waiting.
* Uses millis() function, which overflows and returns to zero every ~49 days
*/
/* Yield Wait For with timeout
*
* Waits for a condition while yielding whenever the condition is not true.
* Passes the ret parameter whenever yielding.
*/
#define yield_wait_for_with_timeout(condition, timeout_time_in_milliseconds, ret)\
do { \
static unsigned long t1 = 0; \
t1 = millis(); \
while (!(condition) && (millis() - t1) \
< timeout_time_in_milliseconds) { \
yield(ret); \
} \
} while (0)


// Set this to the name of your player (dog, cat, etc.)
const char PlayerName[] = "Pet, Clever";

Expand Down