A package to run Monopoly simulations
Project description
Simulation Classes Package: Monopoly Simulation
This package, simulation_classes, provides a comprehensive suite of classes to simulate the classic board game Monopoly. It is designed to model the game's dynamics, including properties, players, and game logic, offering a robust foundation for creating and analyzing Monopoly strategies. Below is an overview of the key components and functionalities provided by this package.
Features
- Monopoly Board Simulation: A central
MonopolyBoardclass that encapsulates the game board, properties, and players, facilitating the simulation of full game rounds. - Game Entities: Includes classes for various game entities such as
Chance,CommunityChest,FreeParking,Go,GoToJail,Jail,Player,Station,Strategy,RandomStrategy,Street,Tax, andUtility. - Gameplay Mechanics: Implements methods for simulating the game's mechanics, such as moving around the board, buying properties, paying rent, drawing Chance and Community Chest cards, and handling special board spaces like Jail and Free Parking.
- Strategic Framework: The package includes a
Strategyclass that can be extended to define custom gameplay strategies. ARandomStrategyclass is provided as an example.
Installation
Option 1
Clone this repository to your local machine:
bashCopy code
git clone https://github.com/catherineannie13/Capstone-Optimising-Monopoly-Gameplay-Strategies.git
cd monopoly-mcts-ai
Ensure you have Python 3.8 or later installed. It's recommended to use a virtual environment:
bashCopy code
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required dependencies:
bashCopy code
pip install -r requirements.txt
Option 2
Run pip install -i https://pypi.org/simple/ simulation-classes-catherineannie13==0.0.1
Usage
Here is a simple example to get started with simulating a Monopoly game:
from simulation_classes.monopoly_board import MonopolyBoard
from simulation_classes.player import Player
# Initialize the game board
board = MonopolyBoard()
# Create players
player1 = Player("Player 1")
player2 = Player("Player 2")
# Add players to the board
board.add_player(player1)
board.add_player(player2)
# Start the game simulation
board.play_game()
Documentation
For a detailed description of all classes and methods, refer to the inline documentation provided within each module. The MonopolyBoard class documentation offers insights into the initialization parameters, attributes, and available methods for simulating the game and interactions between game entities.
Contributing
Contributions to the simulation_classes package are welcome. Please refer to the project's repository for contribution guidelines and submit pull requests with any enhancements, bug fixes, or documentation improvements.
License
simulation_classes is released under the MIT License. See the LICENSE file in the project repository for more information.
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 simulation_classes_catherineannie13-0.0.1.tar.gz.
File metadata
- Download URL: simulation_classes_catherineannie13-0.0.1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4de3482fcff17dc36537c5d9e31e095161d7f393995870b2672783b7d2e3827
|
|
| MD5 |
b81146081b06301497275c21a68bd3cb
|
|
| BLAKE2b-256 |
efce8e913367435151f2b7229268726e5a0909303946f67914c2c658dcf286fa
|
File details
Details for the file simulation_classes_catherineannie13-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simulation_classes_catherineannie13-0.0.1-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7ab4434c7839fcd9742b7b3aea0163cef9b03b8dc614fae4cdb3a4cef9f0dc1
|
|
| MD5 |
4511276ba32107dbaf0ca254385034b4
|
|
| BLAKE2b-256 |
afee155bcc3cf0146563f28dd332899b9430977d2334827342fa5588cad74535
|