Skip to main content

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 MonopolyBoard class 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, and Utility.
  • 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 Strategy class that can be extended to define custom gameplay strategies. A RandomStrategy class 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simulation_classes_catherineannie13-0.0.1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file simulation_classes_catherineannie13-0.0.1.tar.gz.

File metadata

File hashes

Hashes for simulation_classes_catherineannie13-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b4de3482fcff17dc36537c5d9e31e095161d7f393995870b2672783b7d2e3827
MD5 b81146081b06301497275c21a68bd3cb
BLAKE2b-256 efce8e913367435151f2b7229268726e5a0909303946f67914c2c658dcf286fa

See more details on using hashes here.

File details

Details for the file simulation_classes_catherineannie13-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simulation_classes_catherineannie13-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ab4434c7839fcd9742b7b3aea0163cef9b03b8dc614fae4cdb3a4cef9f0dc1
MD5 4511276ba32107dbaf0ca254385034b4
BLAKE2b-256 afee155bcc3cf0146563f28dd332899b9430977d2334827342fa5588cad74535

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page