@@ -46,16 +46,16 @@ class GameServerAPI:
4646 This class provides API functions to communicate with the game server.
4747 """
4848
49- def __init__ (self , server , port , game , token , players = None , name = '' ):
49+ def __init__ (self , server , port , game , token = 'auto' , players = None , name = '' ):
5050 """
5151 Parameters needed in order to connect to the server and to start or join
5252 a game session are passed to this constructor. Parameter game specifies
5353 the game to be started. It corresponds to the name of the game class on
5454 the server. To be able to join a specific game session, all participants
5555 need to agree on a token and pass it to the constructor. The token is
56- used to identify the game session. It can be any string. Alternatively,
57- you can have the server automatically assign you to a session by passing
58- the string 'auto' as the token . Refer to function join for more
56+ used to identify the game session. Alternatively, you can have the
57+ server automatically assign you to a session by passing 'auto' as the
58+ token (this is the default) . Refer to function join for more
5959 information.
6060
6161 The optional parameter players is required by function join in order to
@@ -73,7 +73,7 @@ def __init__(self, server, port, game, token, players=None, name=''):
7373 server (str): server
7474 port (int): port number
7575 game (str): name of the game
76- token (str): name of the game session, 'auto' for automatic assignment
76+ token (str): name of the session (optional) , 'auto' for auto-join (default)
7777 players (int): total number of players (optional)
7878 name (str): player name (optional)
7979
0 commit comments