{"id":19170314,"url":"https://github.com/sashadev-sky/blackjack","last_synced_at":"2026-04-20T03:35:15.660Z","repository":{"id":122652618,"uuid":"143664833","full_name":"sashadev-sky/Blackjack","owner":"sashadev-sky","description":"Terminal console game","archived":false,"fork":false,"pushed_at":"2018-08-08T22:29:32.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-13T03:33:00.416Z","etag":null,"topics":["colorize","game","rspec","ruby","terminal"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/sashadev-sky.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":"2018-08-06T02:11:28.000Z","updated_at":"2018-12-22T21:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6b66b85-64aa-4af9-9096-5a30202c14c4","html_url":"https://github.com/sashadev-sky/Blackjack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sashadev-sky/Blackjack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashadev-sky%2FBlackjack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashadev-sky%2FBlackjack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashadev-sky%2FBlackjack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashadev-sky%2FBlackjack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sashadev-sky","download_url":"https://codeload.github.com/sashadev-sky/Blackjack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashadev-sky%2FBlackjack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["colorize","game","rspec","ruby","terminal"],"created_at":"2024-11-09T09:53:38.079Z","updated_at":"2026-04-20T03:35:15.614Z","avatar_url":"https://github.com/sashadev-sky.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blackjack\n\n- Terminal version of the classic Blackjack card game written in Ruby. Please note specific house rules outlined on this page\n\n## Overview\n\n- Run the command `bundle install` in your terminal\n- To play,  then run `ruby lib/blackjack.rb` in your terminal\n- This game supports multiple players: currently it is set to one player vs. a dealer\n  - To add more, utilize the `add_player` method in the `blackjack.rb` file and save your changes before running the game\n  - Reference the commented out `add_player` invocations at the bottom of the file as an example\n\n## Testing\n  - Written in RSpec\n  - To test all at once: run command `bundle exec rspec`\n  - To test individual spec files:\n    - run, for ex: `bundle exec rspec ./spec/dealer_spec.rb`\n\n## House Rules\n- Each player starts with a bankroll of $1000\n- Each round begins with players entering their bets\n  - The minimum bet is $2\n  - The maximum is equal to the current value of the players bankroll\n- The deck is shuffled prior to each round\n- 2 cards are dealt to each player and the dealer from a standard deck of 52 cards\n  - The dealer's 2nd card will be face down until the players complete their turns\n  - An ace counts as a 1 or 11\n  - Face cards are 10 and any other card is its pip value\n- The dealer will always hit until the value of their hand is \u003e= 17 points\n- Players play against the dealer - multiple players can win\n  - If a player's hand is not busted (over 21) and has a higher score than the dealer, the player will receive their bet double at the end of the round\n  - Otherwise, the player will lose the amount they bet (ties with the dealer are considered a loss)\n- Bets are reset after each round\n- If a player goes bankrupt, they are out of the game\n- Rounds are unlimited and the game is only over when all of the players go bankrupt (in this case, when they can't afford the minimum bet of $2)\n\n#### Ruby Concepts (personal use)\n- RSpec\n  - Unit Testing\n    - Test doubles\n    - Cases where the `dup` method is vital\n    - `respond_to` for checking if variables are exposed\n    - When to use context block\n  - Integration Testing\n- `send` method\n- `colorize` gem\n  - `background` argument for rendering cards\n- Freezing constants\n- Overriding `==`\n- Overriding `to_s`\n- Class inheritance\n- `product` method - to create a deck of cards\n- splat operator - to return cards to deck w/out nested arrays\n- `shift(n)` method\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashadev-sky%2Fblackjack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsashadev-sky%2Fblackjack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashadev-sky%2Fblackjack/lists"}