Subway | Surfers For Linux
# Score increases over time score += 1
# Update coins & collection for coin in coins[:]: coin.update(speed) if coin.off_screen(): coins.remove(coin) elif player.rect.colliderect(coin.rect) and player.track == coin.track: coins.remove(coin) total_coins += 1 score += 10 # extra points for coins Subway Surfers For Linux
# Event handling for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_UP: player.move_up() if event.key == pygame.K_DOWN: player.move_down() # Score increases over time score += 1