#NEWLINE# def do_GET( self ) : #NEWLINE# #INDENT# parsed_path = urlparse . urlparse ( self . path ) #NEWLINE# if ( parsed_path . path == '/favicon.ico' ) : #NEWLINE# #INDENT# self . send_response ( 404 ) #NEWLINE# return #NEWLINE# #UNINDENT# params = urlparse . parse_qs ( parsed_path . query , True ) #NEWLINE# if ( ( not ( 'game' in params ) ) or ( not ( 'session' in params ) ) ) : #NEWLINE# #INDENT# self . intro ( ) #NEWLINE# return #NEWLINE# #UNINDENT# game = params [ 'game' ] [ 0 ] #NEWLINE# if ( not ( game in games ) ) : #NEWLINE# #INDENT# self . intro ( ) #NEWLINE# return #NEWLINE# #UNINDENT# session = params [ 'session' ] [ 0 ] #NEWLINE# if ( not ( session in state ) ) : #NEWLINE# #INDENT# state [ session ] = State ( game , games [ game ] , session , params ) #NEWLINE# #UNINDENT# cmd = '' #NEWLINE# if ( 'cmd' in params ) : #NEWLINE# #INDENT# cmd = params [ 'cmd' ] [ 0 ] #NEWLINE# #UNINDENT# self . play ( cmd , state [ session ] )