{"id":20245429,"url":"https://github.com/letsmakecakes/cards","last_synced_at":"2026-06-04T18:31:18.199Z","repository":{"id":205625926,"uuid":"709203993","full_name":"letsmakecakes/cards","owner":"letsmakecakes","description":"Go Playing Cards Deck\" is a Go project for managing and manipulating decks of playing cards, suitable for card games and simulations","archived":false,"fork":false,"pushed_at":"2023-11-05T14:50:29.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T01:49:44.660Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/letsmakecakes.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":"2023-10-24T08:32:51.000Z","updated_at":"2023-11-05T14:54:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad06082c-5e37-4652-9bf9-a558aaea55f3","html_url":"https://github.com/letsmakecakes/cards","commit_stats":null,"previous_names":["letsmakecakes/cards"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fcards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsmakecakes","download_url":"https://codeload.github.com/letsmakecakes/cards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241688741,"owners_count":20003531,"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":["go","golang"],"created_at":"2024-11-14T09:20:55.301Z","updated_at":"2025-03-03T15:26:04.689Z","avatar_url":"https://github.com/letsmakecakes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Playing Cards Deck\n\nThis Go program defines a simple deck of playing cards and provides various operations on it. You can create, manipulate, and save decks of cards, making it a useful tool for card games and simulations.\n\n## Features\n\n- **Create a New Deck**: Generate a deck of playing cards containing all the standard cards, such as Ace of Spades, Two of Diamonds, Three of Hearts, etc.\n\n- **Display Cards**: Display all the cards in the deck.\n\n- **Deal Cards**: Split the deck into two decks, simulating a card deal.\n\n- **Convert to String**: Convert the deck into a comma-separated string.\n\n- **Save to File**: Save the deck to a file on your local machine.\n\n- **Load from File**: Read a deck from a file on your local machine.\n\n- **Shuffle Cards**: Shuffle the cards in the deck, ensuring randomness.\n\n## Installation\n\n1. Clone this repository to your Go workspace:\n\n   ```bash\n   git clone https://github.com/yourusername/cards.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd goplayingcardsdeck\n   ```\n\n3. Build and run the application:\n\n   ```bash\n   go build\n   ./goplayingcardsdeck\n   ```\n\n## Usage\n\nHere's an example of how to use the Go Playing Cards Deck in your Go program:\n\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n    // Create a new deck\n    cards := newDeck()\n\n    // Shuffle the cards\n    cards.shuffle()\n\n    // Deal a hand of 5 cards\n    hand, remainingDeck := deal(cards, 5)\n\n    // Display the hand and the remaining cards\n    fmt.Println(\"Hand:\")\n    hand.print()\n    fmt.Println(\"Remaining Cards:\")\n    remainingDeck.print()\n\n    // Save the remaining deck to a file\n    remainingDeck.saveToFile(\"mydeck.txt\")\n\n    // Load a deck from a file\n    loadedDeck := newDeckFromFile(\"mydeck.txt\")\n\n    // Display the loaded deck\n    fmt.Println(\"Loaded Deck:\")\n    loadedDeck.print()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fcards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsmakecakes%2Fcards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fcards/lists"}