Package nflgame :: Module player :: Class GamePlayerStats
[frames] | no frames]

Class GamePlayerStats

source code

 object --+    
          |    
PlayerStats --+
              |
             GamePlayerStats

Instance Methods
 
__init__(self, playerid, name, home, team)
Create a new Player instance with the player id (from NFL.com's GameCenter), the player's name (e.g., "T.Brady") and whether the player is playing in a home game or not.
source code
 
__add__(self, other)
Adds two players together.
source code

Inherited from PlayerStats: __getattr__, __str__, __sub__, formatted_stats, has_cat

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from PlayerStats: guess_position, stats, tds, twopta, twoptm, twoptmissed

Inherited from object: __class__

Method Details

__init__(self, playerid, name, home, team)
(Constructor)

source code 

Create a new Player instance with the player id (from NFL.com's GameCenter), the player's name (e.g., "T.Brady") and whether the player is playing in a home game or not.

Overrides: object.__init__
(inherited documentation)

__add__(self, other)
(Addition operator)

source code 

Adds two players together. Only two player objects that correspond to the same human (i.e., GameCenter identifier) can be added together.

If two different players are added together, an assertion will be raised.

The effect of adding two player objects simply corresponds to the sums of all statistical values.

Note that as soon as two players have been added, the 'home' property becomes undefined if the two operands have different values of 'home'.

Overrides: PlayerStats.__add__
(inherited documentation)