add score counting and game-over detection