Skip to content
Merged
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
Snake: Allow food to spawn anywhere
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 authored Oct 24, 2022
commit d159c56e281e51ac3047d3055e89fb35bd48ebcd
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;
}
}