Current collected state Current
Observed since 21 Oct, 09:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Abstract games stuff
pip install AGStuff
>>> from agstuff.cards.core import Card, Cards, Deck
>>>
>>> card1 = Card('As')
>>> card1
A♠
>>> card2 = Card('8d')
>>> card2
8♦
>>> card1 > card2
True
>>>
>>> cards = Cards('As/Ks/Qs')
>>> cards
[A♠, K♠, Q♠]
>>> card1 in cards
True
>>>
>>> cards = Cards(cards=(card2, Card('Tc'), Card('4h')))
>>> cards
[8♦, 4♥, T♣]
>>> card2 in cards
True
>>>
>>> deck = Deck()
>>> cards = Cards()
>>> cards.pull(deck, 5)
>>> cards
[9♥, 2♦, 8♣, 6♠, K♥]
>>> from agstuff.dices.core import Dice, DiceBox
>>>
>>> dice1 = Dice(faces_count=6)
>>> dice1
1 of [1, 2, 3, 4, 5, 6]
>>> dice2 = Dice(6)
>>> dice2
6 of [1, 2, 3, 4, 5, 6]
>>> dice1.rolling()
5
>>> dice1
5 of [1, 2, 3, 4, 5, 6]
>>> dice2.rolling()
1
>>> dice2
1 of [1, 2, 3, 4, 5, 6]
>>> dice1 + dice2
6
>>> dice1 > dice2
True
>>>
>>> dice3 = Dice(faces_items=('Q', 'W', 'E', 'R', 'T', 'Y'))
>>> dice3
E of ['Q', 'W', 'E', 'R', 'T', 'Y']
>>> dice3.rolling()
'Y'
>>> dice3
Y of ['Q', 'W', 'E', 'R', 'T', 'Y']
>>>
>>> dice_box = DiceBox()
>>> dice_box.add(dice1)
>>> dice_box.add(dice2)
>>> dice_box.rolling()
8
>>> dice1
5 of [1, 2, 3, 4, 5, 6]
>>> dice2
3 of [1, 2, 3, 4, 5, 6]
>>> dice1.value
5
>>> dice2.value
3
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.1.0 | 13 Feb 2021 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:f2a8eda5dbb74c544eb0beede4c3678c89feb40d4f95853adba8e5d48823b816