Hologram-based live leaderboard

Leaderboard ext

Leaderboard creates a floating hologram that displays a sorted leaderboard.

from bridge.extensions import Leaderboard

Constructor

Leaderboard(location, title="Leaderboard", get_metric=None,
            update_interval=100, max_entries=10)

Methods

start()

Create the hologram and begin the auto-update loop.

stop()

Remove the hologram and stop updating.


Decorators

@leaderboard.metric

Register the metric getter.

lb = Leaderboard(some_location, title="Top Kills")

@lb.metric
def get_kills(player):
    return stats[player]["kills"]

lb.start()