Exemple #1
0
  def __init__(self, database_service):
    """
    Create a Users object.

    Args:
      database_service the service object that talks to the database.
    """
    assign_injectables(self, locals())
Exemple #2
0
  def __init__(self, database_service, player_id):
    """
    Constructor for GameEngines

    Args:
      database_service the database that this depends on.
      player_id the ID of the current player.
    """
    assign_injectables(self, locals())
  def __init__(self, connection, database):
    """
    Constructor for DatabaseService

    Args:
      connection the connection to use.
      database the database cursor to use.
    """
    assign_injectables(self, locals())
Exemple #4
0
  def __init__(self, user_shelf):
    """
    Create a Users object.

    Args:
      user_shelf a Shelve object obtained from opening the 'users' file.
          Maps usernames to their hashed passwords.
    """
    assign_injectables(self, locals())
Exemple #5
0
  def __init__(self, hashed_password, salt, stickies_json):
    """
    Constructor for UserData

    Args:
      hashed_password the password after being hashed.
      salt the salt used to hash the password.
      stickies_json the JSON string  for their stickies.
    """
    assign_injectables(self, locals())
Exemple #6
0
  def __init__(self, database_service):
    """
    Constructor for GameBuilders

    Args:
      database_service the service to use for persistence.
    """
    assign_injectables(self, locals())
    self.room_names_to_ids = SingleAssignmentDict()
    self.exit_names_to_ids = SingleAssignmentDict()
    self.item_names_to_ids = SingleAssignmentDict()
    self.created_by_user = None
    self.initial_room_id = None
 def __init__(self, for_page, time_visited, id=None):
   assign_injectables(self, locals())
 def __init__(self, created_by_user, original_url, shortened_url, id=None):
   assign_injectables(self, locals())
 def __init__(self, username, hashed_password, salt, id=None):
   assign_injectables(self, locals())
 def __init__(self, connection, cursor):
     assign_injectables(self, locals())
Exemple #11
0
 def __init__(self, foo, bar):
     assign_injectables(self, locals())
Exemple #12
0
 def __init__(self, name, description, from_room, to_room, locked, id=None):
   assign_injectables(self, locals())
   super(Exit, self).__init__()
Exemple #13
0
 def __init__(self, name, description, final_room=False, id=None):
   assign_injectables(self, locals())
   super(Room, self).__init__()
Exemple #14
0
 def __init__(self, created_by_user, currently_in_room, id=None):
   assign_injectables(self, locals())
   super(Player, self).__init__()
Exemple #15
0
 def __init__(self, name, description, use_message,
     owned_by_player, in_room, locked, unlocks_exit, id=None):
   assign_injectables(self, locals())
   super(ExitUnlockingItem, self).__init__()
Exemple #16
0
 def __init__(self, foo, bar):
   from inject import assign_injectables
   assign_injectables(self, locals())