Package tp :: Package netlib :: Package objects :: Module Game :: Class Game
[show private | hide private]
[frames | no frames]

Type Game

object --+        
         |        
    Header --+    
             |    
     Processed --+
                 |
                Game


A Game Description frame consist of:
* a String, Game name
* a String, Key
* a list of Strings, List of protocol versions supported
* a String, Server Version
* a String, Server Type
* a String, Ruleset Name
* a String, Ruleset Version
* a list of,
        * a String, Connection Type
        * a String, Resolvable DNS name
        * a String, IP Address
        * a UInt32, Port
* a list of,
        * a UInt32, Optional Paramater ID
        * a String, String Value
        * a UInt32, Int Value

Method Summary
  __init__(self, sequence, name, key, tp, server, sertype, rule, rulever, locations, optional)
  __str__(self)
Produce a string suitable to be send over the wire.
  optional_get(self)
  required_get(self)
    Inherited from Processed
  __process__(self, data)
    Inherited from Header
  __eq__(self, other)
  __repr__(self)
Return a reconisable string.
  data_set(self, data)
Processes the data of the packet.
  fromstr(cls, data)
Look at the packet type and morph this object into the correct type. (Class method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...

Property Summary
  optional
  required

Class Variable Summary
int no = 66                                                                    
dict options = {1: ('plys', 'players', 'Number of Players in ...
str struct = 'SS[S]SSSS[SSSI][ISI]'
    Inherited from Header
int size = 16                                                                    

Instance Method Details

__str__(self)
(Informal representation operator)

Produce a string suitable to be send over the wire.
Overrides:
tp.netlib.objects.Header.Header.__str__ (inherited documentation)

Property Details

optional

Get Method:
optional_get(self)

required

Get Method:
required_get(self)

Class Variable Details

no

Type:
int
Value:
66                                                                    

options

Type:
dict
Value:
{1: ('plys', 'players', 'Number of Players in the game.'),
 2: ('cons', 'connected', 'Number of Clients currently connected.'),
 3: ('objs', 'objects', 'Number of objects in the game universe.'),
 4: ('admin', 'admin', 'Admin email address.'),
 5: ('cmt', 'comment', 'Comment about the game.'),
 6: ('turn', 'turn', 'When the next turn is generated.')}              

struct

Type:
str
Value:
'SS[S]SSSS[SSSI][ISI]'                                                 

Generated by Epydoc 2.1 on Fri Jan 1 08:00:26 2010 http://epydoc.sf.net