<commit_before>import team
import landmark

class GameMaker:
    def __init__(self, database):
        self.database = database

    def login(self, name, password):
        return_value = False
        current_user = self.database.get_current_user()
        maker_cred = self.database.get_game_maker_cred()
        if current_user is None:
            if maker_cred["username"] == name and maker_cred["password"] == password:
                self.database.set_current_user(self)
                return_value = True
        return return_value

    def add_landmark(self, input):
        name = input[0]
        clue = input[1]
        question = input[2]
        answer = input[3]

        self.database.add_landmark(landmark.Landmark(name, clue, question, answer))

        return "Landmark " + name + " has been added!"

    def display_landmarks(self):
        landmarks = self.database.get_landmarks()
        ret = ""

        if len(landmarks) == 0:
            ret = "There are no landmarks"

        else:
            for landmark in landmarks:
                ret += landmark.get_name() + "\n"

        return ret

    def remove_landmark(self, input):
        landmarks = self.database.get_landmarks()
        found = False

        for landmark in landmarks:
            if landmark.get_name() == input[0]:
                if self.database.remove_landmark(landmark):
                    found = True

        if found:
            return "Removed " + input[0] + " from landmarks."
        else:
            return "Couldn't find landmark with name " + input[0]

    def display_status(self):
        string = ''
        teams = self.database.get_teams()
        for team in teams:
            string += team.username + '\n' #+ ' is at ' + team.landmark + ' with ' + team.penalties + ' penalties\n'
        if string == '':
            string = 'No teams!'
        return string
        
    def logout(self):
        return_value = False
        current_user = self.database.get_current_user()
        if current_user is self:
            self.database.set_current_user(None)
            return_value = True
        return return_value

    def display_menu(self):
        return "Options\n\ndisplaystatus\nmaketeam [team name] [team password]\neditteam [team name to edit] [new team name] [new team password]\n" \
        "addlandmark [name], [clue], [question], [answer]\ndisplaylandmarks\nremovelandmark [name]\nlogout\n"

    def make_team(self, input):
        if len(input) == 3:
            name = input[1]
            password = input[2]
            self.database.add_team(team.Team(name, password, self.database))
            ret_string = "Added " + name
        else:
            ret_string = "Invalid input!"
        return ret_string

    def edit_team(self, input):
        found = False
        if len(input) == 4:
            list = self.database.get_teams()
            for team in list:<commit_msg>Added delete team to display status<commit_after>import team
import landmark

class GameMaker:
    def __init__(self, database):
        self.database = database

    def login(self, name, password):
        return_value = False
        current_user = self.database.get_current_user()
        maker_cred = self.database.get_game_maker_cred()
        if current_user is None:
            if maker_cred["username"] == name and maker_cred["password"] == password:
                self.database.set_current_user(self)
                return_value = True
        return return_value

    def add_landmark(self, input):
        name = input[0]
        clue = input[1]
        question = input[2]
        answer = input[3]

        self.database.add_landmark(landmark.Landmark(name, clue, question, answer))

        return "Landmark " + name + " has been added!"

    def display_landmarks(self):
        landmarks = self.database.get_landmarks()
        ret = ""

        if len(landmarks) == 0:
            ret = "There are no landmarks"

        else:
            for landmark in landmarks:
                ret += landmark.get_name() + "\n"

        return ret

    def remove_landmark(self, input):
        landmarks = self.database.get_landmarks()
        found = False

        for landmark in landmarks:
            if landmark.get_name() == input[0]:
                if self.database.remove_landmark(landmark):
                    found = True

        if found:
            return "Removed " + input[0] + " from landmarks."
        else:
            return "Couldn't find landmark with name " + input[0]

    def display_status(self):
        string = ''
        teams = self.database.get_teams()
        for team in teams:
            string += team.username + '\n' #+ ' is at ' + team.landmark + ' with ' + team.penalties + ' penalties\n'
        if string == '':
            string = 'No teams!'
        return string
        
    def logout(self):
        return_value = False
        current_user = self.database.get_current_user()
        if current_user is self:
            self.database.set_current_user(None)
            return_value = True
        return return_value

    def display_menu(self):
        return "Options\n\ndisplaystatus\nmaketeam [team name] [team password]\neditteam [team name to edit] [new team name] [new team password]\n" \
        "deleteteam [team name to delete]]\n addlandmark [name], [clue], [question], [answer]\ndisplaylandmarks\nremovelandmark [name]\nlogout\n"

    def make_team(self, input):
        if len(input) == 3:
            name = input[1]
            password = input[2]
            self.database.add_team(team.Team(name, password, self.database))
            ret_string = "Added " + name
        else:
            ret_string = "Invalid input!"
        return ret_string

    def edit_team(self, input):
        found = False
        if len(input) == 4:
            list = self.database.get_teams()
            for team in list:
{'fraction_non_alphanumeric': 0.10148849797023005, 'fraction_numerical': 0.0040595399188092015, 'mean_word_length': 1.9984787018255579, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '595501', 'n_tokens_mistral': 1716, 'n_tokens_neox': 1651, 'n_words': 435}