class MasterMindGUI(object): def updateGUI(blackpeg, whitepeg, guessNumber, NoOfPegs, UserGuesslistload, blacklstload,whitelstload): # Updates the textual based interface providied to the user for i in range(25): print("\n") # prints some new lines so it looks neater text = "" # intalise text to string emptytext = " _," # counter = 0 # initalise counter, used for creating the attempt number and getting the black and white number form their lists for lists in UserGuesslistload: # for each list in a list counter = counter + 1 text = "" # set text to nothing everytime it goes through list loop for values in lists: text = text + " " + values + "," # create a string version of the list print("Attempt Number ", counter,) # print for each list the attempt and what was entered and the black and white number print("Your input :",text, ": Black Number = ",blacklstload[counter-1]," : White Number = ", whitelstload[counter-1]) print("------------------------------------------------------------------------") # seperator for l in range(1+counter,13,1): # for any guess that has not be done yet print("Attempt Number ", l,) print("Your input :",emptytext*NoOfPegs, ": Black Number = _ : White Number = _ ") # print this to screen with the guess being unknnown print("------------------------------------------------------------------------") #-------------------------------------------------------------DRAWTEXTGUI------------------------------------------------------------ def DrawGUI(NoOfPegs): # creates the GUI for when the game is first played for i in range(1,13,1): text = " _," print("Attempt Number ", i,) print("Your input :",text*NoOfPegs, ": Black Number = _ : White Number = _ ") print("------------------------------------------------------------------------") #-------------------------------------------------------------STARTGAME---------------------------------------------------------------- def StartGame(coloursAvaliable): print(coloursAvaliable) print("Please use the first letter of the colour in the program e.g. p for purple or r for red") print("please enter in the format r,b,g,y") print("You have 12 guess's to get the correct answer") print("\n")