{"id":21360630,"url":"https://github.com/zachwhaley/roll","last_synced_at":"2025-06-27T07:33:22.206Z","repository":{"id":32244511,"uuid":"35818775","full_name":"zachwhaley/roll","owner":"zachwhaley","description":"Dice rolling programs written in various languages","archived":false,"fork":false,"pushed_at":"2022-12-04T16:05:08.000Z","size":28,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-22T19:11:36.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zachwhaley.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":"2015-05-18T13:13:22.000Z","updated_at":"2024-10-01T07:03:16.000Z","dependencies_parsed_at":"2023-01-14T20:49:20.314Z","dependency_job_id":null,"html_url":"https://github.com/zachwhaley/roll","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/zachwhaley%2Froll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachwhaley%2Froll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachwhaley%2Froll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachwhaley%2Froll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachwhaley","download_url":"https://codeload.github.com/zachwhaley/roll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835951,"owners_count":20355611,"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-22T05:35:33.634Z","updated_at":"2025-03-16T06:36:22.328Z","avatar_url":"https://github.com/zachwhaley.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roll\n\nDice rolling programs written in various languages\n\n## Want to make your own?\n\nStart with a simple program that takes in an argument like `1d4` and prints a random number between 1 and 4\n\n```\n$ ./roll 1d4\n3\n```\n\nTake multiple arguments while allowing input like `2d6` and `d8`; print the sum as well.\n\n```\n$ ./roll 1d4 2d6 d8\n2\n5\n3\n8\n\n18\n```\n\nAdd some ASCII art\n\n```\n   .    /'\\          .__.    __     .\n  / \\  /___\\  ./\\.  /\\__/\\  /__\\  .´ `.\n / 4 \\ \\ 8 / //10\\\\ \\/12\\/ /\\20/\\ \\100/\n `---´  \\./  ``--´´  `--´  \\_\\/_/  `-´\n```\n\n```\n$ ./roll 2d4\n  .\n / \\\n/ 2 \\\n`---´\n\n  .\n / \\\n/ 1 \\\n`---´\n\n3\n```\n\nModify your code to use modifiers ;)\n\n```\n$ ./roll 2d4 +1\n  .\n / \\\n/ 3 \\\n`---´\n\n  .\n / \\\n/ 1 \\\n`---´\n\nTotal modifiers: 1\n\n5\n```\n\nHandle errors\n\n```\n$ ./roll\nNo dice\n\n$ ./roll 1d3\nd3 is not a valid dice\n\n$./roll bleh\nBad argument: bleh\n```\n\nPrint the dice horizontally\n\n```\n$ ./roll.py d10 d12\n        .__.\n ./\\.  /\\__/\\\n//07\\\\ \\/11\\/\n``--´´  `--´\n\n18\n```\n\nAnd so on :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachwhaley%2Froll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachwhaley%2Froll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachwhaley%2Froll/lists"}