![]() The game continues, and in some games you will be able to win just by using this strategy. If there is a square that is obviously not a mine, then it can be safely uncovered. ![]() You can see that the red stars have to be mines because the 1 squares diagonal to each of them have no other adjacent neighbors that could be a mine except for the one covered square, so therefore, that square must be a mine. Here the purple dot is the starting point, and then the two red stars are covered squares that have to be mines. _cell(row, exit(self, widget, data=None):Īdding the timer, smiley face, and flags in Minesweeper.So then you can go around that perimeter and see if you can identify any unknown squares that would definitely be mines, or definitely be safe. _start(id, expand=True, fill=True, padding=0)ĭef clicked_handler(self, button, row, col):Ĭell_index = _index(row, col) Print 'Button connect in col '.format(col, row)Ĭell.get_button().connect('clicked', self.clicked_handler, row, col) While mines < (self.rows * ls * self.ratio):įor i, cell in enumerate(_cells()): Self.attach(cell.get_button(), row, col, 1, 1) # with return _sensitive(False) don't show I clicked all board and all buttons are disable. I try do this in my discoverfunction return _sensitive(False) but after that I don't get any value of my buttons. I want to block button after click with set_sensitive() property. ![]() I have a problem with show value of label after click using set_sensitive(False).įirst case I use button.hide()after click and this works good, label value are shows up.īut I don't want to use hide(). ![]() I write simple minesweeper game in Python 2.7 with Gtk3. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |