Skip to content

Commit

Permalink
Removed macro def from Symon game (#20)
Browse files Browse the repository at this point in the history
* removed macro def

* bumped lib version
  • Loading branch information
JelmerT authored and trottier committed Oct 21, 2019
1 parent af6980f commit 5d7ac9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
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

0 comments on commit 5d7ac9c

Please sign in to comment.