From 9c3406895c5366729a13701640e1e13777879d9e Mon Sep 17 00:00:00 2001 From: TQMatvey Date: Wed, 14 Sep 2022 12:46:40 +0700 Subject: [PATCH] Arkanoid: rand_range, remote temp number --- applications/arkanoid/arkanoid_game.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/arkanoid/arkanoid_game.c b/applications/arkanoid/arkanoid_game.c index 6cdd606d9..0e96277f2 100644 --- a/applications/arkanoid/arkanoid_game.c +++ b/applications/arkanoid/arkanoid_game.c @@ -67,8 +67,7 @@ static const NotificationSequence sequence_short_sound = { // generate number in range [min,max) int rand_range(int min, int max) { - int number = min + rand() % (max - min); - return number; + return min + rand() % (max - min); } void move_ball(Canvas* canvas, ArkanoidState* st) {