Skip to content

Repository files navigation

Project JMonopoly

JMonopoly is an engaging rendition of the classic board game, Monopoly, developed entirely in Java. Leveraging the power of the JTamaro library, it offers a seamless user experience with intuitive graphical interfaces and interactive gameplay. Players embark on a journey through iconic properties, strategically buying, selling, and trading to build their real estate empire. With customizable game settings and dynamic AI opponents, JMonopoly promises hours of immersive entertainment for both novice players and seasoned Monopoly enthusiasts alike.

State pattern of the game

State Pattern

Implemented Features

  • Multiple human/computer players.
  • Multiple kinds of board tiles (unobtainable, colored, transport, industrial).
  • Upgrading colored tiles with houses
  • Configurable board loaded from a file

Possible Future Features

  • Save
  • Undo/Redo
  • Multiple strategies for Computer Player
  • Other kinds of slots (e.g., prison)

Current Limitations

  • Tile hierarchy is violating the LSP. UnobtainableTile is not a proper subtype of Tile interface. This could be resolved be merging UnobtainableTile and ObtainableTile into one class with Option for Property.
  • Property collection is represented using a String. This creates the need to compare strings for equality, which is not ideal. This could be resolved by turning collections into types.
  • Test coverage.

Team Members

Mentor

  • Igor Moreno

Project Structure

This project is a Gradle project.

You can use Gradle to compile, test, and check the code by running gradlew in this top-level directory (see below).

You can run the code compiled by Gradle from the terminal (see below).

The code is inside the src/main/java/project folder and the test code is in src/test/java/project.

The classes inside the model package contain the entities and business logic of your project. The classes in the model package need to come with unit tests.

The classes in the ui package must not refer to any classes in the model package (these classes do not need to be covered with tests).

How build using Gradle

Use the assemble task (either in VSCode Gradle Project/Tasks/build/assemble) or by running ./gradlew assemble.

How run the JUnit tests

Use the Test View in VSCode to run the tests or run the following command in the terminal ./gradlew test.

How to run PMD

PMD checks for common programming flaws in your code and provides suggestions to improve it.

Use the pmdMain task (either in VSCode Gradle Project/Tasks/other/pmdMain) or by running ./gradlew pmdMain.

How to run CPD

CPD checks for code duplication and highlights lines of code that you should refactor to improve the quality of your code.

Use the cpdCheck task (either in VSCode Gradle Project/Tasks/other/cpdCheck) or by running ./gradlew cpdCheck.

How to determine test coverage

In the test view of VSCode, run the tests using the "Run tests with coverage" icon.

Description created with generative AI as all professional projects do.*

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages