SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class PlayerProxy(object):
  2.     def __init__(self, addr, s):
  3.         super(Player, self).__init__()
  4.         self.addr = addr # (ip, port)
  5.         self.s = s # socket
  6.  
  7.     def get_first_turn(self, game_state, hand):
  8.         message = b'hey buddy get me ur first turn, heres the game state and hand'
  9.         self.s.sendto(message, self.addr)
  10.         # TODO wait for response
  11.         return response
  12.  
  13.     def get_normal_turn(self, game_state, hand):
  14. r       message = b'hey buddy get me a normal turn, heres the game state and hand'
  15.         self.s.sendto(message, self.addr)
  16.         # TODO wait for response
  17.         return response
  18.  
  19.     def inform_loser(self, game_state):
  20.         pass
  21.  
  22.     def inform_winner(self, game_state):
  23.         pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top