From d159c56e281e51ac3047d3055e89fb35bd48ebcd Mon Sep 17 00:00:00 2001 From: TQMatvey <77576395+TQMatvey@users.noreply.github.com> Date: Mon, 24 Oct 2022 09:31:18 +0700 Subject: [PATCH] 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 --- applications/plugins/snake_game/snake_game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/plugins/snake_game/snake_game.c b/applications/plugins/snake_game/snake_game.c index 1d753084918..6429d8f253e 100644 --- a/applications/plugins/snake_game/snake_game.c +++ b/applications/plugins/snake_game/snake_game.c @@ -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; } @@ -406,4 +406,4 @@ int32_t snake_game_app(void* p) { free(snake_state); return 0; -} \ No newline at end of file +}