def get_playerdict(table):
    """ Returns a dictionary of seat indexes and players. """
    players = {}
    for i, s in enumerate(table.seats):
        if s.occupied():
            players[i] = s.player
    return players