{"id":18258213,"url":"https://github.com/grimsteel/cli-monopoly","last_synced_at":"2025-04-08T22:47:35.201Z","repository":{"id":257483718,"uuid":"786939046","full_name":"grimsteel/cli-monopoly","owner":"grimsteel","description":"Command line monopoly interface","archived":false,"fork":false,"pushed_at":"2024-09-16T20:11:33.000Z","size":2013,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T17:58:14.217Z","etag":null,"topics":["curses","monopoly","tui"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grimsteel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-15T15:31:39.000Z","updated_at":"2024-09-16T20:12:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"2afab76f-b3cc-4e33-91a9-f8d68e50bb4d","html_url":"https://github.com/grimsteel/cli-monopoly","commit_stats":null,"previous_names":["grimsteel/cli-monopoly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimsteel%2Fcli-monopoly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimsteel%2Fcli-monopoly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimsteel%2Fcli-monopoly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimsteel%2Fcli-monopoly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grimsteel","download_url":"https://codeload.github.com/grimsteel/cli-monopoly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941718,"owners_count":21022037,"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":["curses","monopoly","tui"],"created_at":"2024-11-05T10:29:37.718Z","updated_at":"2025-04-08T22:47:35.178Z","avatar_url":"https://github.com/grimsteel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command Line Monopoly in C++\r\n\r\n\u003e  AP CSP: 2023 - 2024\r\n\r\nThis project will have two main parts:\r\n1. A common Monopoly library for managing game state and simulating actions\r\n2. A console interface to Monopoly using `ncurses` (Linux) or `pdcurses` (Windows).\r\n\r\n### Progress:\r\n\r\n- [x] Monopoly Library\r\n  - [x] Properties\r\n  - [x] Money dealing (rent)\r\n  - [x] Houses\r\n  - [x] Chance/Community Chest\r\n- [x] Console Interface\r\n  - [x] Properties\r\n  - [x] Menu\r\n  - [x] Stats\r\n\r\n## Building\r\n\r\n`make`: Compile and link entire project\r\n\r\n### Misc\r\n\r\n`make screenshots`: Create a PDF file of the entire project along with PNG files of individual segments (these PNG files do not include any comments).\r\n\r\n**Video**:\r\n\r\n```shell\r\nmkfifo video.fifo\r\n# This records the current terminal\r\nasciinema rec video.cast\r\nemulation/video-game.sh\r\n\r\n# In another shell:\r\n# This controls the game through video.fifo\r\nemulation/video-controller.sh\r\n```\r\n\r\n## About\r\n\r\n### Structure of a turn:\r\n\r\n1. Player is prompted with a menu. They may either:\r\n    1. Roll dice\r\n    1. End turn\r\n    1. Buy houses/hotels\r\n    1. Mortgage properties\r\n1. If the player opts to roll the dice, they are moved a random number of spaces forward.\r\n1. If the player passed Go, $200 is added to their balance.\r\n1. The board item's `handlePlayer` method is called.\r\n    This method makes the player's icon appear on the property, and takes any other actions:\r\n    1. Chance/community chest -\u003e draw card and take action\r\n    1. Tax -\u003e deduct money\r\n    1. Go to Jail\r\n    1. Property -\u003e buy if enough money or pay rent\r\n    1. Free Parking/Jail/Go -\u003e do nothing\r\n1. If any of these actions reduced the player's balance to 0, they are declared bankrupt and cannot particpate further\r\n1. Next, the menu is presented again. The option to roll a dice will only appear if they rolled doubles\r\n1. If they roll doubles 3 times, they immediately go to jail, and are presented with the menu again\r\n\r\n### Property Value Calculation\r\n\r\n[Wikibooks](https://en.wikibooks.org/wiki/Monopoly/Properties_reference)\r\n\r\nThere does not seem to be a visible pattern.\r\nFor some properties, 2 house rent = 3 * 1 house rent\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimsteel%2Fcli-monopoly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrimsteel%2Fcli-monopoly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimsteel%2Fcli-monopoly/lists"}