{"id":16697039,"url":"https://github.com/shetharp/card-game","last_synced_at":"2025-04-05T03:43:41.811Z","repository":{"id":43502224,"uuid":"168793244","full_name":"shetharp/card-game","owner":"shetharp","description":"🃏  A web app boilerplate for card games","archived":false,"fork":false,"pushed_at":"2023-01-04T16:25:46.000Z","size":3062,"stargazers_count":1,"open_issues_count":22,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T12:12:39.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://shetharp.github.io/card-game/","language":"JavaScript","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/shetharp.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}},"created_at":"2019-02-02T04:15:55.000Z","updated_at":"2022-11-29T20:33:59.000Z","dependencies_parsed_at":"2023-02-02T18:31:03.727Z","dependency_job_id":null,"html_url":"https://github.com/shetharp/card-game","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shetharp%2Fcard-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shetharp%2Fcard-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shetharp%2Fcard-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shetharp%2Fcard-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shetharp","download_url":"https://codeload.github.com/shetharp/card-game/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284918,"owners_count":20913691,"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":[],"created_at":"2024-10-12T17:45:55.726Z","updated_at":"2025-04-05T03:43:41.791Z","avatar_url":"https://github.com/shetharp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Card Game\nThis is a web app game that lets you flip cards and collect points against a dealer.\n### [🃏 Click to Play! →](https://shetharp.github.io/card-game/)\n\n![screenshot](screenshot.png)\n\n## Gameplay\nTo play the game, click the `Start Game` button. We play with a standard deck of 52 cards. Clicking the `Deal` button deals a card to all players, including the dealer. You calculate points by flipping cards face up.\n\n## Development\nThis is a React web app bootstrapped with [Create React App](http://github.com/facebook/create-react-app).\nThe card game is managed with the [Deck of Cards API](http://deckofcardsapi.com/).\n\nThe following `npm` packages were also used:\n* `axios` for API service calls\n* `styled-components` for CSS in JS styling\n\n## Local Install\nTo install this web app locally, follow these steps.\n1. Clone this repo.\n2. Navigate to the this project's directory and run `npm install`\n3. To begin developing, run `npm start`\n4. To build the project for deployment, run `npm run build`\n\n## Making this your own\nThis web app was built with extensibility and future scalability in mind.\n\n### Multiple Players\nOut of the box, this game supports multiple players. You can also change the default player's name to something other than `dealer`. These settings, along with others, are included in the `src/api/settings.js` file.\n\n### Unshuffled Deck\nBy default we play with a shuffled deck. You can customize this in the `src/api/settings.js` file.\n\n### Theme\nBasic theme settings are stored in the `src/styles/theme.js` file. Further customizations are easy to do with `styled-components` as everything needed to style a component is included in its component file.\n\n### Custom Cards\nThe Cards used in this game are designed with CSS. They are _not images._ You can customize the both the Back and the Front of the Card by editing the Card component file in `src/components/Card.js`.\n\n### Managing Hands\nThe game currently requests to `Draw` a card from the deck and add it to that player's `pile` (AKA hand) through the API. To reduce latency and minimize the number of API calls, the game does not request the API to list each player's hand each time a card is drawn. The game only requests the API to list each player's hand if a previous game is being resumed to reinitialize the game state.\n\n### Save Game\nThis game currently supports resuming the most recently played game. The game stores the `deckID` from the Deck of Cards API in the user's `localStorage` to resume the game. Currently, _the game does not store any other information besides the `deckID`._\n\n## Potential New Features and Future Dev Work\n* Allow players to draw cards independently\n* Implement a game of Blackjack\n* Design the cards to show the corresponding number of suit symbols based on its value\n* Design face cards with only CSS\n* Make the web app responsive and optimized for mobile\n* Save multiple games with `localStorage`\n* Create an algorithm to automate the dealer's game strategy\n* Get a new deck once the current one runs out\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshetharp%2Fcard-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshetharp%2Fcard-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshetharp%2Fcard-game/lists"}