#this file deals with the current sequence, like checking if it's correct, checking which sequence in the list we're at, etc. #importing necessary variables from other files if __name__ != "__main__": from game import sequencelist #if this file is run in script mode, it will assign arbitrary testing values in order to check whether the code is running correctly elif __name__ == "__main__": i = 2 sequence1 = [0, 2, 5] sequence2 = [2, 3, 1] sequence3 = [0, 2] sequencelist = [sequence1, sequence2, sequence3] currentinput = [0, 2] currentinputlength = len(currentinput) currentsequence = sequencelist[i] currentsequencelength= len(currentsequence) #function that checks if the input matches the sequence def checkcorrect(): if currentsequencelength != currentinputlength: correct = False else: for c in range (len(currentsequence)): if currentsequence[c] != currentinput[c]: correct = False else: correct = True print (correct) if __name__ == "__main__": checkcorrect()