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

Class GameClock

source code

object --+
         |
        GameClock

Represents the current time in a game. Namely, it keeps track of the quarter and clock time. Also, GameClock can represent whether the game hasn't started yet, is half time or if it's over.

Instance Methods
 
__init__(self, qtr, clock)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
is_pregame(self) source code
 
is_halftime(self) source code
 
is_final(self) source code
 
__cmp__(self, other) source code
 
__str__(self)
Returns a nicely formatted string indicating the current time of the game.
source code

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

Properties
  quarter

Inherited from object: __class__

Method Details

__init__(self, qtr, clock)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Returns a nicely formatted string indicating the current time of the game. Examples include "Q1 10:52", "Q4 1:25", "Pregame", "Halftime" and "Final".

Overrides: object.__str__

Property Details

quarter

Get Method:
unreachable.quarter(self)
Set Method:
unreachable.quarter(self, value)