BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::parsers::frostbite2::util::TeamScoresBlock Class Reference

List of all members.

Public Member Functions

def __init__
def __len__
def __getitem__
def get_target_score
def __repr__
def __init__
def __len__
def __getitem__
def get_target_score
def __repr__

Private Attributes

 _num_teams
 _scores
 _target_score

Detailed Description

help extract team scores info from frostbite data obtain from game events

usage :
    teamScores = TeamScoresBlock([2, 130, 245, 1000])
    print "num of teams : %s" % len(teamScores)
    print "first team's score : %s" % teamScores[0]
    print "second team's : %s" % teamScores[1]
    print "the first 2 teams' scores : %s" % teamScores[0:2]
    print "target score : %s " % teamScores.get_target_score()
    for p in teamScores:
        print p

Constructor & Destructor Documentation

def b3::parsers::frostbite2::util::TeamScoresBlock::__init__ (   self,
  data 
)
Represent a frostbite Team Scores block
    
This describes the number of tickets, or kills, for each team in the current round.

    <number of entries: integer> - number of team scores that follow 
    N x <score: integer> - score for all teams 
    <target score: integer> - when any team reaches this score, the match ends 
def b3::parsers::frostbite2::util::TeamScoresBlock::__init__ (   self,
  data 
)
Represent a frostbite Team Scores block
    
This describes the number of tickets, or kills, for each team in the current round.

    <number of entries: integer> - number of team scores that follow 
    N x <score: integer> - score for all teams 
    <target score: integer> - when any team reaches this score, the match ends 

Member Function Documentation

def b3::parsers::frostbite2::util::TeamScoresBlock::__getitem__ (   self,
  key 
)
Returns the team score data, for provided key (int or slice)
def b3::parsers::frostbite2::util::TeamScoresBlock::__getitem__ (   self,
  key 
)
Returns the team score data, for provided key (int or slice)
def b3::parsers::frostbite2::util::TeamScoresBlock::__len__ (   self)
def b3::parsers::frostbite2::util::TeamScoresBlock::__len__ (   self)
def b3::parsers::frostbite2::util::TeamScoresBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::TeamScoresBlock::__repr__ (   self)
def b3::parsers::frostbite2::util::TeamScoresBlock::get_target_score (   self)
def b3::parsers::frostbite2::util::TeamScoresBlock::get_target_score (   self)

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Properties