Monopoly Game
Overview
This is a fully-featured implementation of the classic board game Monopoly, developed as a university project in Java with two other students. The game simulates the traditional Monopoly experience with a text-based console interface, supporting multiple players, property management, trading, and various avatar types with unique movement mechanics.
Features
- Local Multiplayer Support: Game for 2-6 players with turn-based gameplay.
- Unique Avatars: Car, Sphinx, Hat, and Ball avatars, with basic and (some) distinct advanced movement rules.
- Property System: Buy, sell, mortgage, and unmortgage properties across 8 color groups.
- Building Options: Construct houses, hotels, swimming pools, and sports tracks on properties.
- Dynamic Economy: Property prices increase during the game, affecting rent and trade values.
- Chance & Community Chest: Draw cards that can move players, grant money, or impose penalties.
- Trading System: Propose and accept trades involving properties and/or money between players.
Technical Details
The application is built using core Java with a strong emphasis on Object-Oriented Programming principles. Key architectural decisions include:
- Package Organization: Code is modularized into packages for avatars, cards, board spaces, buildings, exceptions, and core game logic.
- Inheritance & Polymorphism: Extensive use of class hierarchies to manage different board space types.
- Memory Management: Efficient use of ArrayLists and HashMaps for game state tracking.
The core game loop manages player turns, command parsing, and game state transitions.
Challenges and Solutions
A major challenge was implementing the different avatar movement rules, which required careful position calculation and intermediate space evaluation.
Also, this project involved collaborative development, task division, and version control using Git, which enhanced teamwork skills.
Lessons Learned
This project provided deep experience in:
- Designing and implementing OOP systems in Java.
- Writing robust error handling and input validation.
- Collaborating on a codebase with multiple developers.
- Applying software design patterns like inheritance, polymorphism, and interfaces.
It highlighted the importance of careful planning in development, especially regarding rule complexity and state management.