Thanks for your comment! I checked my code and now the game can end correctly.
The graphics... yes I'm also concerned... I'm starting to learn some art.