Monopoly Deal simulator
Project description
Monopoly Deal (card game) simulator in python
Quickstart:
% python -m monodeal.game
Player A recieved RentCard[PropertyColour.GREEN|DARKBLUE]
Player B recieved MoneyCard[1]
Player A recieved MoneyCard[1]
Player B recieved PropertyCard[GREEN,'Oxford Street']
Player A recieved MoneyCard[2]
Player B recieved PropertyCard[ORANGE,'Vine Street']
Player A recieved RentCard[PropertyColour.BROWN|PALEBLUE]
...
Player B recieved PropertyCard[STATION,'Liverpool St']
Player B recieved PropertyCard[MAGENTA,'Pall Mall']
Player B has hand [PropertyCard[STATION,'Liverpool St'], PropertyCard[MAGENTA,'Pall Mall']]
Player B has property [
PS(GREEN,3/3,Oxford Street,Regent Street,Bond Street,-,-),
PS(ORANGE,2/3,Vine Street,Bow Street,-,-),
PS(STATION,2/4,Fenchurch St,Kings Cross Station,-,-),
PS(MAGENTA,2/3,Northumberland Ave,Whitehall,-,-),
PS(DARKBLUE,1/2,Mayfair,-,-),
PS(PALEBLUE,1/3,Euston Road,-,-),
PS(BROWN,2/2,Whitechapel Road,Old Kent Road,-,-),
PS(YELLOW,1/3,Leicester Square,-,-),
PS(RED,2/3,Strand,Trafalgar Square,-,-),
PS(UTILITY,1/2,Electric Company,-,-)])
Player B does action PlayPropertyAction(player=Player B, card=PropertyCard[STATION,'Liverpool St'], colour=<PropertyColour.STATION: 2>)
Player B does action PlayPropertyAction(player=Player B, card=PropertyCard[MAGENTA,'Pall Mall'], colour=<PropertyColour.MAGENTA: 32>)
Player B has won!
Open topics:
- best discard and payment strategy to meet hand size or payment demand
- optimise wildcards within property sets
- scoring and ordering actions
Other work
This is quite OK: https://github.com/brylee123/MonopolyDeal/blob/master/init_deck.py
Thoughts
When a player does an action:
SkipAction
PlayMoney(MoneyCard or ActionCard)
PlayProperty(PropertyCard or WildPropertyCard or RainbowPropertyCard)
existing propertySet or new
MoveProperty (does not count as one of 3 actions)
existing propertySet index, property index
new propertySet index
PlayAction
card: action card or None
opponent: player or None
ForcedDeal
opposing (player, property set, property index) [not from a complete set]
your (property set, property index)
SlyDeal
opposing (player, property set, property index) [not from a complete set]
HouseAction
property set that is complete
HotelAction
property set complete with house
CollectRainbowRent
opposing player
your property set
CollectRent
RentCard
your property set (must match one of two flags on card)
DebtCollector
opposing player
ItsMyBirthdayAction
card
DealBreakerAction
opposing (player, property set)
JustSayNo action happens ad-hoc?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monodeal-0.0.1.tar.gz.
File metadata
- Download URL: monodeal-0.0.1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f33a5bf7ea31251dc7d555b5669559e02fdbf711885832abd4e4f0cd8d48ea9
|
|
| MD5 |
f805a08b4b59a48db4a7fe3737906c52
|
|
| BLAKE2b-256 |
1d7da3213e6b4008df112b510b890ff457f6fff586fb0c43ec3e63cd65d5befa
|
Provenance
The following attestation bundles were made for monodeal-0.0.1.tar.gz:
Publisher:
publish.yml on shuckc/monodeal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monodeal-0.0.1.tar.gz -
Subject digest:
8f33a5bf7ea31251dc7d555b5669559e02fdbf711885832abd4e4f0cd8d48ea9 - Sigstore transparency entry: 226858365
- Sigstore integration time:
-
Permalink:
shuckc/monodeal@acfceea28735446ab7ff43ae80c7a8461a632dcd -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/shuckc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@acfceea28735446ab7ff43ae80c7a8461a632dcd -
Trigger Event:
release
-
Statement type:
File details
Details for the file monodeal-0.0.1-py3-none-any.whl.
File metadata
- Download URL: monodeal-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3448f7ba2b87ebe363a38204095b5f2b10f788f8932841165c36b3a055c9309
|
|
| MD5 |
1d25123f77626a89e656b0982a9140b8
|
|
| BLAKE2b-256 |
5bf1325469d2f20b2c06398368b471cc507cb5215405b6d1cb21b24bc990bfba
|
Provenance
The following attestation bundles were made for monodeal-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on shuckc/monodeal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monodeal-0.0.1-py3-none-any.whl -
Subject digest:
b3448f7ba2b87ebe363a38204095b5f2b10f788f8932841165c36b3a055c9309 - Sigstore transparency entry: 226858368
- Sigstore integration time:
-
Permalink:
shuckc/monodeal@acfceea28735446ab7ff43ae80c7a8461a632dcd -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/shuckc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@acfceea28735446ab7ff43ae80c7a8461a632dcd -
Trigger Event:
release
-
Statement type: