{"id":21384997,"url":"https://github.com/kyle-seto/straights","last_synced_at":"2025-03-16T11:43:28.724Z","repository":{"id":173347691,"uuid":"363761318","full_name":"Kyle-Seto/Straights","owner":"Kyle-Seto","description":"C++ Object Oriented Programing Card Game","archived":false,"fork":false,"pushed_at":"2022-11-12T23:29:13.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T23:41:30.857Z","etag":null,"topics":["cpp","oop-principles"],"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/Kyle-Seto.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":"2021-05-02T22:16:19.000Z","updated_at":"2022-11-12T23:29:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f12db4be-e792-4256-b49a-ea3c83acfc6a","html_url":"https://github.com/Kyle-Seto/Straights","commit_stats":null,"previous_names":["kyle-seto/straights"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2FStraights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2FStraights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2FStraights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2FStraights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kyle-Seto","download_url":"https://codeload.github.com/Kyle-Seto/Straights/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864626,"owners_count":20360355,"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":["cpp","oop-principles"],"created_at":"2024-11-22T11:44:15.154Z","updated_at":"2025-03-16T11:43:28.718Z","avatar_url":"https://github.com/Kyle-Seto.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Straights\n## C++ Object Oriented Programing Card Game\n### UML Diagram:\n![UML Diagram](uml-final.jpg \"Optional title\")\n### Link to Demo:\n![Demo](demo.pdf \"Optional title\")\n\n\n## Design\n\nIn the player of the game straights, it was possible that the player was a computer or a human.\nFor each turn, I called a player method to play its turn. This method was virtual and was\noverloaded using computer and human classes that were subclasses of the player. This is an\nexample of a template method design pattern. The player method was abstract with concrete\nimplementation from the subclasses human and computer.\\\n\\\nI also implemented the ability to quit the game from a player turn without leaking memory. This\nwas done by using smart pointers and ensuring all functions have a basic guarantee, so that when\nthe exception is thrown to quit the program it will not leak memory.\\\n\\\nIn the game class a vector of pointers to the player class was used so that we could have both\nplayers and computers. Since these were subclasses of players, we used polymorphism to allow\nthe game to have both.\\\n\\\nIn the code, we also had many cases where there were many similarities among classes. For\nexample the deck, the cards players had in their hand, the discards, and the table closely\nresembled each other but also had key differences. I used inheritance to reuse code for these\nclasses. This way they all had similar implementations but I could also add their own methods\nand fields if need be.\\\n\n### More details of the project can be found in the ![Documentation](design.pdf \"Optional title\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-seto%2Fstraights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyle-seto%2Fstraights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-seto%2Fstraights/lists"}