![]() This is my attempt at Minesweeper using classes to represent the map and a single cell of the map. ![]() You would get a lot of benefit from a couple of simple classes. If count = 0 and number_array != "X" and number_array (rowxcolumn-columns-1) and number_array != "X" and not(count = rowxcolumn-1) and not(count = rowxcolumn-columns) and number_array columns and count < (rowxcolumn-columns-1) and number_array != "X" and number_array < double_check: Label_id(column = column, row = row)īomb = random.randint(1,len(number_array) -1) Label_list.append(ttk.Label(mainframe, text = " ", relief = "raised", width= 3)) # label_creation = ttk.Label(mainframe, text = " ", relief = "raised", width= 3) Ttk.Label(mainframe, text= "You Won! Play again").grid(column= 0, row=5, columnspan= 20) (text = " " + str(num_array), relief = "sunken") Ttk.Label(mainframe, text= "You lost! Try again").grid(column= 0, row=21, columnspan=20)Įlif str(num_array) != "X" and keep_going: Label_nfigure(text = " X", relief = "sunken") Mainframe = ttk.Frame(root, padding="12 12 12 12") We have almost completed programming the game and all we just need is to create the timer, smiley face and the flags and this is where we have been stuck on. Hi everyone, A friend of mine and I have been working on a Minesweeper game created in Python in Tkinter.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |