Load Excel Module
The Load Excel module is responsible for extracting game data from Excel spreadsheets (.xlsx), validating it, and transforming it into Python data structures (primarily dictionaries) that can be used by the Property Tycoon game. This module serves as a bridge between external data files (like board layout and card text) and the game’s internal representation.
This module provides functions to:
Load detailed property information for each board space from PropertyTycoonBoardData.xlsx, including name, position, type (property, station, utility, tax, special), price, rent, house costs, group, and actions.
Handle potential variations in file paths and data formatting within the Excel file.
Load key-value pairs for game text (e.g., Chance/Pot Luck card descriptions) from the Game Text sheet in PropertyTycoonCardData.xlsx.
Detailed Design
Component Diagram
This diagram shows how the Load Excel module interacts with external Excel files and provides data to other game components.
Details the steps involved in reading the property data Excel file.
Shows the simpler process of reading the card/game text sheet.
Illustrates the structure of the dictionary returned by load_property_data. The keys are string representations of the board position numbers.
Data Structure Diagram (Property Data)