{"id":27192364,"url":"https://github.com/sameh-farouk/rust_guessing_game","last_synced_at":"2025-06-25T10:38:04.127Z","repository":{"id":127939599,"uuid":"368849494","full_name":"sameh-farouk/rust_guessing_game","owner":"sameh-farouk","description":"a classic beginner programming problem in Rust","archived":false,"fork":false,"pushed_at":"2021-05-24T14:24:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T18:56:40.832Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameh-farouk.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":"2021-05-19T11:43:58.000Z","updated_at":"2021-05-24T14:24:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"672f6a36-8a78-4be9-9dfd-b0db8463838d","html_url":"https://github.com/sameh-farouk/rust_guessing_game","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sameh-farouk/rust_guessing_game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Frust_guessing_game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Frust_guessing_game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Frust_guessing_game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Frust_guessing_game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameh-farouk","download_url":"https://codeload.github.com/sameh-farouk/rust_guessing_game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Frust_guessing_game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261853286,"owners_count":23219837,"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":"2025-04-09T18:44:37.625Z","updated_at":"2025-06-25T10:38:04.080Z","avatar_url":"https://github.com/sameh-farouk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\nnote: this project for-educational-purposes-only and it have very basic code in rust as i started to learn rust just yesterday.\n\nthis is a classic beginner programming problem: a guessing game. Here’s how it works: the program will generate a random integer between 1 and 100. It will then prompt the player to enter a guess. After a guess is entered, the program will indicate whether the guess is too low or too high. If the guess is correct, the game will print a congratulatory message and exit.\n\nwhile i code this project  I practiced the fundamentals and learnt about:\n* `let`\n* `match`\n* methods\n* associated functions\n* using external crates\n* using cargo\n* handling Potential failure with the Result type\n\n### Built With\n\n* [Rust](https://www.rust-lang.org/)\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get a local copy up and running follow these simple example steps.\n\n### Prerequisites\n\n* Rust\n  ```sh\n  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n  ```\nIf you have installed Rustup some time ago, chances are your Rust version is out of date. Get the latest version of Rust by running `rustup update`.\n\n### Installation\n\n1. Clone the repo\n   ```sh\n   git clone https://github.com/sameh-farouk/rust_guessing_game.git\n   ```\n3. cd into `rust_guessing_game`:\n   ```sh\n   cd rust_guessing_game\n   ```\n4. Compile and run it in the same step using `cargo run` command:\n   ```sh\n   cargo run\n   ```\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n```sh\n$ cargo run\n   Compiling guessing_game v0.1.0 (file:///projects/guessing_game)\n    Finished dev [unoptimized + debuginfo] target(s) in 4.45s\n     Running `target/debug/guessing_game`\nGuess the number!\nPlease input your guess.\n10\nYou guessed: 10\nToo small!\nPlease input your guess.\n99\nYou guessed: 99\nToo big!\nPlease input your guess.\nfoo\nPlease input your guess.\n61\nYou guessed: 61\nYou win!\n```\n\n_For more examples, please refer to the [Guessing game tutorial](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html)_\n\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n* [The Rust Programming Language: The Book](https://doc.rust-lang.org/book/title-page.html)\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://www.linkedin.com/in/sameh-farouk-software-developer/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameh-farouk%2Frust_guessing_game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameh-farouk%2Frust_guessing_game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameh-farouk%2Frust_guessing_game/lists"}