Hey, I am trying to make my rectangle move without it redrawing and to due that I have put my background in function draw(). The rectangle is doing what I want it after I moved the background, however the text and the backgrounds in the different screens are being blocked. I am worried that when I am go to put my actual images my game will not work as intended. Please help be figure how I can have the rectangle not redraw itself every time it moves and the backgrounds and text in each screen stay the same. Do I need to reorder things? Thank you!
** This is the link to my code: https://replit.com/@starvlightt/Game-Jam-Project-Gita-S#script.js **