{"id":19367166,"url":"https://github.com/abailly/black-jack","last_synced_at":"2025-09-02T04:35:45.655Z","repository":{"id":66589800,"uuid":"584547241","full_name":"abailly/black-jack","owner":"abailly","description":"An experimental Black Jack game on Hydra","archived":false,"fork":false,"pushed_at":"2024-01-08T21:12:23.000Z","size":632,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-06T21:45:54.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/abailly.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}},"created_at":"2023-01-02T22:04:38.000Z","updated_at":"2023-01-02T22:05:08.000Z","dependencies_parsed_at":"2024-01-07T19:29:05.729Z","dependency_job_id":null,"html_url":"https://github.com/abailly/black-jack","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/abailly%2Fblack-jack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abailly%2Fblack-jack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abailly%2Fblack-jack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abailly%2Fblack-jack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abailly","download_url":"https://codeload.github.com/abailly/black-jack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240491113,"owners_count":19809974,"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-11-10T07:48:24.047Z","updated_at":"2025-02-24T13:40:32.812Z","avatar_url":"https://github.com/abailly.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Games on Hydra\n\nAn experiment to build distributed and decentralised games running on top of Cardano Layer 2, [Hydra](https://hydra.family).\nThis project started with [Black Jack](https://en.wikipedia.org/wiki/Blackjack) and then switched to focus on _Chess_ which is a much more interesting game.\n\n\u003e [!WARNING]\n\u003e This project is a work-in-progress and experimental, it's not meant (yet?) to be used for real playing on mainnet and it's advised to only run it on test networks.\n\u003e The code follows a duct-tape-and-staples design strategy which basically means I hack stuff until they work just enough to make some progress, then move on. Furthermore, it suffers from premature generalisation as I attempted to decouple from the interaction with the execution and settlement layer too early.\n\n## Status\n\n* [x] Rules [in PlutusTx](./black-jack-core/src/Chess/Game.hs) test-driven in [Haskell](./black-jack-core/test/Chess/GameSpec.hs)\n* [x] Barebones Console based interface\n* [x] ~~Mock server simulating lifecycle on Hydra (for testing purpose)~~\n* [x] Basic [Plutus](./black-jack-core/src/Chess/Contract.hs) smart contract\n* [x] Create Cardano transactions using only [cardano-cli](https://github.com/IntersectMBO/cardano-cli)\n* [x] Advanced smart contract: Check play is valid for any given game state\n* [ ] ~~Proper \"randomness\"~~\n* [x] Startup \u0026 configure Hydra server in the background\n* [x] Startup \u0026 configure cardano-node in the background\n* [ ] Support for 2-players\n* [ ] Web UI\n\n# Why?\n\nThe ability to play games in a safe and decentralised way is one\npossible use case of blockchains. However, Layer 1 is way too\nexpensive and slow to enable a good gaming experience, hence the need\nto rely on Layer 2 to speed things up and make it cheap and affordable\nto play games with other people.\n\nHaving contributed to [Hydra](https://hydra.family) since its\ninception, I also wanted to start experimenting with how one could\nbuild such a system and application to make it reasonably easy to use\nHydra for gaming purpose.\n\nThe [Experience Report](./2023-experience-report.md) contains some\nthoughts about Cardano, Hydra, DApps development, stemming from this\nexperiment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabailly%2Fblack-jack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabailly%2Fblack-jack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabailly%2Fblack-jack/lists"}