Implemented the score logic.
Replaced repaint with update.
Fixed and updated the file.
Added new variables, implemented them, and added an update method.