Skip to content

Commit

Permalink
Snake: Allow food to spawn anywhere
Browse files Browse the repository at this point in the history
food was only spawning on old snake path from previous firmware versions, now it can spawn on each pixel on new snake path
  • Loading branch information
TQMatvey committed Oct 24, 2022
1 parent 64ecdce commit d159c56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions applications/plugins/snake_game/snake_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ static Point snake_game_get_new_fruit(SnakeState const* const snake_state) {
if((buffer[y] & mask) == 0) {
if(newFruit == 0) {
Point p = {
.x = x * 2,
.y = y * 2,
.x = x,
.y = y,
};
return p;
}
Expand Down Expand Up @@ -406,4 +406,4 @@ int32_t snake_game_app(void* p) {
free(snake_state);

return 0;
}
}

0 comments on commit d159c56

Please sign in to comment.