From 78f847a25d37819515468fb39e214d354f889c70 Mon Sep 17 00:00:00 2001
From: salaaad2 <arthurdurant263@gmail.com>
Date: Tue, 4 Jan 2022 23:08:13 +0100
Subject: shotty makes a sound

---
 src/main.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/main.cpp')

diff --git a/src/main.cpp b/src/main.cpp
index 3136318..d30878a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -44,6 +44,7 @@ int main(void) {
                 next += game->getNext();
 
                 delete game;
+                CloseAudioDevice();
                 if (next != "0") {
                     game = new Game(next);
                 }
@@ -79,15 +80,16 @@ int main(void) {
         {
             if (auto code = game->getKeys()) {
                 if (code == 1)
-                    gs = ENDING;
+                {gs = ENDING;}
                 else if (code == 2)
-                    gs = NEXT;
+                {gs = NEXT;}
             }
             game->draw();
             break ;
         }
         case (NEXT):
         {
+            ClearBackground(RAYWHITE);
             break ;
         }
         case (ENDING):
-- 
cgit v1.2.3