Exemplo n.º 1
0
 def _player_played_card(self, player, card):
     """
     Show that the player played the card.
     :param player: the player
     :param card: the card
     """
     card_size = (130, 184)
     im_filename = get_card_image_filename(card)
     im = self._rm.get_image(im_filename)
     pos = self._player_positions[player]
     im_w = ImageWidget((pos[0]-card_size[0]/2, pos[1]-card_size[1]/2), card_size, 20+len(self._played_card_widgets), im)
     self._background_widget.add_widget(im_w)
     x = self.screen.get_width()/2 - 200 + len(self._played_card_widgets) * 60
     y = 150 + len(self._played_card_widgets) * 10
     im_w.add_action(actions.MoveToAction((x, y), 1))
     self._played_card_widgets.append(im_w)
Exemplo n.º 2
0
 def _player_played_card(self, player, card):
     """
     Show that the player played the card.
     :param player: the player
     :param card: the card
     """
     card_size = (130, 184)
     im_filename = get_card_image_filename(card)
     im = self._rm.get_image(im_filename)
     pos = self._player_positions[player]
     im_w = ImageWidget(
         (pos[0] - card_size[0] / 2, pos[1] - card_size[1] / 2), card_size,
         20 + len(self._played_card_widgets), im)
     self._background_widget.add_widget(im_w)
     x = self.screen.get_width() / 2 - 200 + len(
         self._played_card_widgets) * 60
     y = 150 + len(self._played_card_widgets) * 10
     im_w.add_action(actions.MoveToAction((x, y), 1))
     self._played_card_widgets.append(im_w)