コード例 #1
0
ファイル: cards.py プロジェクト: jasujm/bridge
    def setPlayerPosition(self, position):
        """Set position of the current player

        The player must be set before setting cards in the trick. The card
        played by the current player is laid at the bottom of the panel.
        """
        self._rect_map = dict(zip(positions.rotate(position), self._CARD_RECTS))
コード例 #2
0
    def setPlayerPosition(self, position):
        """Set position of the current player

        The player must be set before setting cards in the trick. The card
        played by the current player is laid at the bottom of the panel.
        """
        self._rect_map = dict(zip(positions.rotate(position),
                                  self._CARD_RECTS))
コード例 #3
0
ファイル: cards.py プロジェクト: jasujm/bridge
    def setPlayerPosition(self, position):
        """Set position of the current player

        The position must be set before setting cards. Cards for the current
        player are laid at the bottom of the area.
        """
        self._position = positions.asPosition(position)
        hand_map = {}
        for position, hand, label in zip(
                positions.rotate(self._position), self._hand_panels,
                self._position_labels):
            hand_map[position] = (hand, label)
            label.setText(positions.positionLabel(position))
            label.resize(hand.width(), label.height())
        self._hand_map = hand_map
        self._trick_panel.setPlayerPosition(self._position)
コード例 #4
0
    def setPlayerPosition(self, position):
        """Set position of the current player

        The position must be set before setting cards. Cards for the current
        player are laid at the bottom of the area.
        """
        self._position = positions.asPosition(position)
        hand_map = {}
        for position, hand, label in zip(positions.rotate(self._position),
                                         self._hand_panels,
                                         self._position_labels):
            hand_map[position] = (hand, label)
            label.setText(positions.positionLabel(position))
            label.resize(hand.width(), label.height())
        self._hand_map = hand_map
        self._trick_panel.setPlayerPosition(self._position)