Beispiel #1
0
 def _createWidgetsFromGrid(self):
     layout = QtGui.QGridLayout(self)
     for location in Grid.allGridLocations():
         card_widget = CardWidget(self)
         card_widget.setCard(self.grid.card(location))
         layout.addWidget(card_widget, location[1], location[0])
         self._linkWidgetAndLocation(card_widget, location)
Beispiel #2
0
 def test_newGame_emits_cardChanged_signal_for_each_location(self):
     for location in Grid.allGridLocations():
         assert (location in self.cardChanged_locations)
Beispiel #3
0
 def test_newGame_sets_face_down_cards(self):
     for location in Grid.allGridLocations():
         if location not in Grid.POINT_CARD_LOCATIONS:
             yield (self.check_newGame_sets_face_down_cards, location)