cleaned code in rendering rhythm game