{"id":34688144,"url":"https://github.com/fifth-postulate/camel-up-oracle","last_synced_at":"2026-05-17T16:34:34.042Z","repository":{"id":62438781,"uuid":"232412174","full_name":"fifth-postulate/camel-up-oracle","owner":"fifth-postulate","description":"The game Camel up is a game of chance. This project provides you with an oracle to answer questions.","archived":false,"fork":false,"pushed_at":"2020-09-26T14:17:40.000Z","size":15408,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T10:09:22.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fifth-postulate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-07T20:34:07.000Z","updated_at":"2020-09-26T14:17:42.000Z","dependencies_parsed_at":"2022-11-01T21:51:47.276Z","dependency_job_id":null,"html_url":"https://github.com/fifth-postulate/camel-up-oracle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fifth-postulate/camel-up-oracle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fifth-postulate%2Fcamel-up-oracle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fifth-postulate%2Fcamel-up-oracle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fifth-postulate%2Fcamel-up-oracle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fifth-postulate%2Fcamel-up-oracle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fifth-postulate","download_url":"https://codeload.github.com/fifth-postulate/camel-up-oracle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fifth-postulate%2Fcamel-up-oracle/sbom","scorecard":{"id":399174,"data":{"date":"2025-08-11","repo":{"name":"github.com/fifth-postulate/camel-up-oracle","commit":"f51df6fae9ebc225b238238a125b182aadc96c95"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0139","Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T19:43:37.777Z","repository_id":62438781,"created_at":"2025-08-18T19:43:37.777Z","updated_at":"2025-08-18T19:43:37.777Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33145438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-12-24T21:55:48.717Z","updated_at":"2026-05-17T16:34:34.019Z","avatar_url":"https://github.com/fifth-postulate.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camel Up Oracle\nThe game [Camel up][camel-up] is a game of chance. This project provides you with an oracle to answer questions.\n\n## Camel Up\nCamel Up is a\n\n\u003e board game for two to eight players. It was designed by Steffen Bogen and\n\u003e illustrated by Dennis Lohausen, and published in 2014 by Pegasus Spiele. Players\n\u003e place bets on a camel race in the desert; the player who wins the most money is\n\u003e the winner of the game.\n\nIt is a lovely game that is well balanced between players of all ages.\n\n## Examples\n### Yellow in the lead, red in pursuit\n![Yellow in a considerable lead](http://fifth-postulate.nl/camel-up-oracle/1.jpg)\n\nLook at the above situation. Yellow has taken a considerable lead in the race,\nwith red straining to catch up. Both the red and the yellow dice are in play.\nThinking long and hard one can come to the following conclusion.\n\nFor the next throw one of six things can happen. \n\n1. Red comes up one\n2. Red comes up two\n3. Red comes up three\n4. Yellow comes up one\n5. Yellow comes up two\n6. Yellow comes up three\n\nOnly in one situation will Red win, i.e. when red comes up three. Whatever\nhappens next the red camel will be on top of the yellow one and red will be\nvictorious.\n\nEven in this race, the reasoning is complex. Let's use this crate to verify\nour reasoning.\n\nfirst announce the `camel_up` crate to your dependencies.\n\n```yaml\ncamel_up = *\n```\n\nNext announce that we would like to use it.\n\n\n```rust\nexternal crate camel_up;\n```\n\nWe will make use of the prelude to import a few useful names.\n\n```rust\nuse camel_up::prelude::*;\n```\n\nIn our `main` function we will recreate the race. The `Race` struct implements\nthe [`FromStr`][fromstr] trait. This allows one to parse a string that describes\na race into a `Race`. Every camel is designated by the first letter of their\ncolor. Positions are marked via a comma `,`. So our race is described by\n`\"r,,,y\"`. Use that description in making a race.\n\n```rust\nlet race = \"r,,,y\".parse::\u003cRace\u003e().expect(\"to parse\");\n```\n\nSimilarly, The remaining dice can be created as well.\n\n```rust\nlet dice = \"ry\".parse::\u003cDice\u003e().expect(\"to parse\");\n```\n\nWith a `Race` and a set of `Dice` we can project how the race will be run.\n\n```rust\nlet result = project(\u0026race, \u0026dice);\n```\n\nIt returns a `Chances` mapping camels to their chance of winning. We can turn it\ninto a `Vec`.\n\n```rust\nlet mut ordered: Vec\u003c(Camel, Fraction)\u003e =\n    result.winner.values().map(|(k, v)| (*k, *v)).collect();\n```\n\nwhich can be sorted by decreasing chance.\n\n```rust\nordered.sort_by(|(_, left), (_, right)| right.cmp(\u0026left));\n```\n\nWe can use that to output those chances, winner will be in the front.\n\n```rust\nfor (camel, fraction) in ordered {\n    print!(\"({camel:?},{fraction})\");\n}\nprintln!()\n```\n\nRunning this will output\n\n```plain\n(Yellow,5/6)(Red,1/6)\n```\n\nWhich supports our earlier hard work.\n\n### Tower\nThe red camel is the underdog in the above situation. Can we change the odds?\nThe red camel could ask their friends to help. By building a unit of camels the\nchances might change in favor of the red camel.\n\n\n![Red asking friends for help](http://fifth-postulate.nl/camel-up-oracle/4.jpg)\n\nChanging the above [example][example] one can verify that Red needs all there\nfriends to have a better chance of winning and beating Yellow.\n\n### General\nQuestions like the ones above can be answered in general. The main executable\ncan be fed a description of a race and set of remaining dice and project who\nwill be in the lead.\n\n```plain\ncargo run -- --race=\"gr,,y\" --dice=\"gry\"\n```\n\n[camel-up]: https://en.wikipedia.org/wiki/Camel_Up\n[fromstr]: https://doc.rust-lang.org/std/str/trait.FromStr.html\n[example]: https://github.com/fifth-postulate/camel-up-oracle/blob/master/examples/tower.rs \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffifth-postulate%2Fcamel-up-oracle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffifth-postulate%2Fcamel-up-oracle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffifth-postulate%2Fcamel-up-oracle/lists"}