Mighty Engine
Example
game = PledgePhase(start_player=0, min_count=13)
while not game.pledge_done():
print('Boss: {}\tShape: {}\tCount: {}'.format(*game.current_pledge()))
print('queue: {}'.format(game.pledge_queue))
player = game.turn_player()
print('Player {}: {}'.format(player, game.hand(player=player)))
pledge_until_valid(game)
if game.boss is not None:
game = ExtraPhase(*game.pledge_result())
game.prepare_extra_hand()
boss = game.boss
hand = game.hand(player=boss)
print('Boss extra hand: {}'.format(hand))
discard = list(map(int, input('Discard: ').split()))
game.discard_extra(discard=discard)
friend_condition = input('Pick friend: ')
game.pick_friend(friend_condition)
game = PlayPhase(*game.extra_result())
for r in range(10):
print('Round {}'.format(r))
for _ in range(game.NUM_PLAYERS):
print(game.round_state())
player = game.turn_player()
hand = game.hand(player=player)
print(hand)
while True:
card = int(input('Card: '))
valid, actions = game.check_submit(card=card)
if not valid:
continue
elif actions:
print(actions)
action = actions[int(input())]
game.submit(card=card, action=action)
else:
game.submit(card=card, action=None)
break
print(game.submitted_cards())
print(game.round_summary())
print(game.final_summary())
Release files for mighty 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mighty-1.0.1.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mighty-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / mighty-1.0.1.tar.gz
| Download URL | mighty-1.0.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea19bccb80c12c760ef5738ff575ac7c24086cb5291cb79257b08747ac3e12b1
|
|
BLAKE2b-256 checksum How to use checksums |
e82daa8a6d3489813ff2c52d6c0ba9da4756195f041f1a093d562df11f1fad37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-42-generic
|
Release files / mighty-1.0.1-py3-none-any.whl
| Download URL | mighty-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73f8c5d8b5c70cefd774c9dd9d8326bc8de206b382fd327cf2500fed7978c0df
|
|
BLAKE2b-256 checksum How to use checksums |
0c072c5f72e956bd699afe720a6f6116bcc02279866ef02ce66fcd56cc75258b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-42-generic
|