def showScore(score):
 scoreDigits = [int(x) for x in list(str(score))]
 totalWidth = 0
 for digit in scoreDigits:
  totalWidth += IMAGES['numbers'][digit].get_width()
 Xoffset = ((SCREENWIDTH - totalWidth) / 2)
 for digit in scoreDigits:
  SCREEN.blit(IMAGES['numbers'][digit], (Xoffset, (SCREENHEIGHT * 0.1)))
  Xoffset += IMAGES['numbers'][digit].get_width()

def showScore ( score ) : scoreDigits = [ int ( x ) for x in list ( str ( score ) ) ] totalWidth = 0 for digit in scoreDigits : totalWidth += IMAGES [ 'numbers' ] [ digit ] . get_width ( ) Xoffset = ( ( SCREENWIDTH - totalWidth ) / 2 ) for digit in scoreDigits : SCREEN . blit ( IMAGES [ 'numbers' ] [ digit ] , ( Xoffset , ( SCREENHEIGHT * 0.1 ) ) ) Xoffset += IMAGES [ 'numbers' ] [ digit ] . get_width ( )
displays score in center of screen .