{"id":21368640,"url":"https://github.com/liraymond04/monopoly-java","last_synced_at":"2025-07-14T06:38:23.382Z","repository":{"id":187380439,"uuid":"655758265","full_name":"liraymond04/Monopoly-Java","owner":"liraymond04","description":"Java clone of Monopoly created for a school project","archived":false,"fork":false,"pushed_at":"2023-08-10T04:04:51.000Z","size":2116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T17:19:06.325Z","etag":null,"topics":["game-development","java","monopoly","tui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liraymond04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-19T14:35:16.000Z","updated_at":"2024-07-17T07:27:20.000Z","dependencies_parsed_at":"2023-08-10T05:20:59.541Z","dependency_job_id":null,"html_url":"https://github.com/liraymond04/Monopoly-Java","commit_stats":null,"previous_names":["liraymond04/monopoly-java"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liraymond04%2FMonopoly-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liraymond04%2FMonopoly-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liraymond04%2FMonopoly-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liraymond04%2FMonopoly-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liraymond04","download_url":"https://codeload.github.com/liraymond04/Monopoly-Java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841217,"owners_count":20356446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","java","monopoly","tui"],"created_at":"2024-11-22T07:25:41.206Z","updated_at":"2025-03-16T08:13:29.998Z","avatar_url":"https://github.com/liraymond04.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Personal Project: Monopoly\n\n## About\n\nThis is a **Java** clone of *Monopoly* created for a school project based\non the [official rule-set](https://www.officialgamerules.org/monopoly).\nMonopoly is a turn-based multiplayer board game, where the objective\nof the game is to not go bankrupt and outlive the other players by\nacquiring properties and collecting rent.\n\n## Who is this for?\n\n*Monopoly* is a fun game that can be played with friends and family, its\ncombination of strategy and luck makes it simultaneously engaging and\naccessible to a wide variety of people. This project aims to bring the\nMonopoly experience to players as a cross-platform desktop application.\n\n## Why Monopoly?\n\nAs a player of the official PC port of *MONOPOLY® PLUS* from Ubisoft,\nI was frustrated with many of the user interface choices, such as:\n- Only being able to change transaction values by 1, making inputting\nlarge values difficult\n- Unclear controls for how to select properties to exchange during trades\n\nMany of these issues with the user interface are due to the game being designed\nfor gamepad controllers. This usually makes the game unintuitive and unplayable\nfor desktop users, most of whom use mouse and keyboard to play.\n\nAs a project for school, I think Monopoly is a decently complex game that\nwill be interesting to design and implement, and is achievable within my\nlimits as a programmer.\n\n## User Stories\n\n- As a user, I want to be able to choose how many players to start a game with ✓\n- As a user, I want to be able to roll dice to choose how many squares to move ✓\n- As a user, I want to be able to buy or auction un-owned properties that I land on\n- As a user, I want to be able to pay rent to players whose un-mortgaged properties I land on\n- As a user, I want to be able to draw a card when I land on CHANCE or COMMUNITY CHEST\n- As a user, I want to be able to collect money when I pass GO ✓\n- As a user, I want to be able to sell properties to other players\n- As a user, I want to be able to buy and sell houses and hotels on properties whose colour-set I own\n- As a user, I want to be able to mortgage and lift mortgages on properties I own\n- As a user, I want to be able to end my turn and pass it to another player ✓\n- As a user, I want to be able to save my game from the pause menu ✓\n- As a user, I want to be able to be warned to quit without saving, when quitting from the pause menu ✓\n- As a user, I want to be able to choose a game to load from the main menu ✓\n\n## Instructions for Grader\n\n- You can generate the first required action related to adding Xs to a Y by adding players to a game in the main menu screen\n- You can generate the second required action related to adding Xs to a Y by pressing M to add balance to player\n- You can generate a third action related to adding Xs to a Y by rolling a dice to change the player's position on a board\n- You can generate a fourth action related to adding Xs to a Y by adding 200 to a player's balance if they pass GO\n- You can locate my visual component by opening or creating a new game, and viewing the game board\n- You can save the state of my application by opening the pause menu and selecting the option to save the game\n- You can load the state of my application by choosing a save to load from the main menu screen\n\n### Main menu\n- You can press LEFT and RIGHT arrows to change the number of players to create a game with\n- You can press DOWN and UP arrows to change menu option\n- You can press ENTER is used to select menu option\n- You can press ESCAPE to exit pop-up menu\n\n### Inside game\n- You can press ESCAPE to open pause menu\n- You can press DOWN and UP arrows to change menu option\n- You can press ENTER to select menu option\n\n### Debug functions in game\n- You can press F to print name of current player\n- You can press G to change turn to next player\n- You can press H to print balance of player\n- You can press J to move player 39 squares\n- You can press M to add 10 dollars to the current player's balance\n\n## Research resources for Swing\n- https://www.tutorialspoint.com/how-can-we-set-the-background-color-to-a-jpanel-in-java\n- https://stackoverflow.com/questions/5926022/how-to-paint-outside-of-paintcomponent\n- https://stackoverflow.com/questions/10876491/how-to-use-keylistener\n- https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/java-games-keyboard-and-mouse-r2439/\n\n## Phase 4: Task 2\n```\nEvent Log:\nTue Apr 11 10:29:26 PDT 2023\nInitialized 3 game players\n\nTue Apr 11 10:29:26 PDT 2023\nInitialized game board\n\nTue Apr 11 10:29:26 PDT 2023\nAssigned player play1 to square 3, balance 200\n\nTue Apr 11 10:29:26 PDT 2023\nAssigned player play2 to square 20, balance 415\n\nTue Apr 11 10:29:26 PDT 2023\nAssigned player play3 to square 5, balance 50\n\nTue Apr 11 10:29:28 PDT 2023\nMove player play3 4 spaces\n\nTue Apr 11 10:29:28 PDT 2023\nSet player play3 current square to 9\n\nTue Apr 11 10:29:28 PDT 2023\nAdd 10 to player play3 balance\nPlayer balance now 60\n\nTue Apr 11 10:29:29 PDT 2023\nAdd 10 to player play3 balance\nPlayer balance now 70\n```\n\n## Phase 4: Task 3\n\nIf I were to refactor, I would change the ConsoleRenderer class to the singleton pattern. In the GameScene and MainScene\nclasses, a private field of the Application instance is needed so that the class can access the methods required for\ndrawing to the screen. However, we know that there should only ever be a single instance of the Application class, so\nthe singleton pattern would be appropriate to access these methods.\n\nSince the instance of Application is only ever used by the scenes to draw to the screen, we can instead make the\nConsoleRenderer a singleton and directly access its implementation. By doing this, we avoid having to access the\nApplication class when drawing to the screen, and we can just let it handle the main application loop.\n\nThis creates an intuitive separation in logic, as the ConsoleRenderer class can handle drawing while the Application\nclass handles the higher level application logic. Making ConsoleRenderer a singleton also allows for easy access to the\ndraw methods in classes that need them, such as the GameScene and MainScene.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliraymond04%2Fmonopoly-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliraymond04%2Fmonopoly-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliraymond04%2Fmonopoly-java/lists"}