{"id":22376747,"url":"https://github.com/benami171/catan_cpp_implementation","last_synced_at":"2025-10-24T08:10:30.748Z","repository":{"id":244681516,"uuid":"803436205","full_name":"benami171/Catan_Cpp_Implementation","owner":"benami171","description":"My implementation of the game Catan in Cpp, as part of a university course in cpp.","archived":false,"fork":false,"pushed_at":"2024-09-14T08:22:22.000Z","size":5626,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T23:29:38.593Z","etag":null,"topics":["board-game","catan","catan-board-game","cpp","inheritance"],"latest_commit_sha":null,"homepage":"","language":"C++","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/benami171.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-20T18:09:48.000Z","updated_at":"2024-09-14T08:22:25.000Z","dependencies_parsed_at":"2024-09-14T19:26:08.425Z","dependency_job_id":null,"html_url":"https://github.com/benami171/Catan_Cpp_Implementation","commit_stats":null,"previous_names":["benami171/system_programming2_exe3","benami171/catan_cpp_implementation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benami171%2FCatan_Cpp_Implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benami171%2FCatan_Cpp_Implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benami171%2FCatan_Cpp_Implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benami171%2FCatan_Cpp_Implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benami171","download_url":"https://codeload.github.com/benami171/Catan_Cpp_Implementation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245708994,"owners_count":20659626,"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":["board-game","catan","catan-board-game","cpp","inheritance"],"created_at":"2024-12-04T22:11:13.862Z","updated_at":"2025-10-24T08:10:30.670Z","avatar_url":"https://github.com/benami171.png","language":"C++","readme":"# Catan implementation in C++\n\n## Board Class:\n\nMy catan board is represented by two vectors.\nThe first one is a vector of structurePlace objects of size 54 and vector roadPlaces of size 72. the structurePlaces vector represents the nodes and the roadPlaces vector represents the edges of the board.\nEach node and edge on the board were assigned a number, and the road/structure that represents them will be accessed through the vector in their matching number in the vectors, for example if i want to access node number 12 i will go to structurePlaces[12].\nThe board is hard-coded, theres no randomization.\n\n### Understanding the Board Representation in the Code:\n- each `Yellow` number represents the number of the node in the structurePlace vector.\n- each `Blue` number represents the number of the edge in the roadPlace vector.\n![image](https://github.com/benami171/System_Programming2_Exe3/assets/102553622/fca93a22-6bbf-4340-90fd-3be06fadc4de)\n\n### Inheritance and Development Cards:\nIn this assignment,I have implemented a hierarchy of development cards in the Catan game using inheritance. The base class developmentCard provides a common interface and shared functionality for all specific types of development cards. The derived classes, such as knightCard, monopolyCard, roadBuildingCard, victoryPointCard, and yearOfPlentyCard, each extend the base class to provide specific behavior for each card type.\n\n### Rules Adaptations in My Implementation\n- `trade`: The current player selects the resources they want to give and receive and the player they want to trade with. If both players have the required resources, the trade is executed.\n- `knight`: According to the assignment guidelines, the knight is only used to gather knights for the largest army card.\n- `knight cards amount`: based on the task readme, we have 3 knight cards in the game deck.\n\n## Usage Guidance\n- To compile and run the program use `make catan`\n- To compile and run the tests use `make test`\n\n## Future Improvements:\n- Would like to make the game interactive between the cpu and a user.\n- Reorganize the dependancies in the game, there is actually no need in tiles representation if we really think about it..\n- Currently the game board is predetermined, would like to make it random.\n\n## Contributions:\nFeel free to suggest any improvements, you can contact me via massages on Github or through my E-mail: benami171@gmail.com.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenami171%2Fcatan_cpp_implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenami171%2Fcatan_cpp_implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenami171%2Fcatan_cpp_implementation/lists"}