Package nflgame :: Module game :: Class FieldPosition
[frames] | no frames]

Class FieldPosition

source code

object --+
         |
        FieldPosition

Represents field position.

The representation here is an integer offset where the 50 yard line corresponds to '0'. Being in the own territory corresponds to a negative offset while being in the opponent's territory corresponds to a positive offset.

e.g., NE has the ball on the NE 45, the offset is -5. e.g., NE has the ball on the NYG 2, the offset is 48.

Instance Methods
 
__init__(self, pos_team, yardline)
pos_team is the team on offense, and yardline is a string formatted like 'team-territory yard-line'.
source code
 
__cmp__(self, other) source code
 
__str__(self)
str(x)
source code

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

Static Methods
a new object with type S, a subtype of T
__new__(cls, pos_team, yardline) source code
Properties

Inherited from object: __class__

Method Details

__new__(cls, pos_team, yardline)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, pos_team, yardline)
(Constructor)

source code 

pos_team is the team on offense, and yardline is a string formatted like 'team-territory yard-line'. e.g., "NE 32".

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)