{"id":21605760,"url":"https://github.com/itsmenicky/guess-the-number","last_synced_at":"2025-03-18T14:40:11.879Z","repository":{"id":232911579,"uuid":"785489853","full_name":"itsmenicky/Guess-The-Number","owner":"itsmenicky","description":"A guess the number game developed in Java","archived":false,"fork":false,"pushed_at":"2024-04-13T19:12:53.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T19:16:00.500Z","etag":null,"topics":["console-game","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/itsmenicky.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}},"created_at":"2024-04-12T01:35:50.000Z","updated_at":"2024-04-13T18:07:04.000Z","dependencies_parsed_at":"2024-04-12T09:55:04.697Z","dependency_job_id":"d987eb4b-7092-467f-9191-11d59560e918","html_url":"https://github.com/itsmenicky/Guess-The-Number","commit_stats":null,"previous_names":["itsmenicky/guess-the-number"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmenicky%2FGuess-The-Number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmenicky%2FGuess-The-Number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmenicky%2FGuess-The-Number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmenicky%2FGuess-The-Number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsmenicky","download_url":"https://codeload.github.com/itsmenicky/Guess-The-Number/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244242651,"owners_count":20421913,"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":["console-game","java"],"created_at":"2024-11-24T20:17:17.430Z","updated_at":"2025-03-18T14:40:11.856Z","avatar_url":"https://github.com/itsmenicky.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=center\u003eGuess The Number 🤔☕\u003c/br\u003e\u003cimg src=\"https://github.com/aleen42/badges/blob/docs/src/cli.svg\"\u003e\u003cimg src=\"https://badges.aleen42.com/src/java.svg\"\u003e\u003c/h1\u003e\n\n\u003cp align=justify\u003eIt is necessary for the algorithm to generate a random number to be guessed by the user. To do this, I used the random library, generating a random number between 0 and 100 and storing it in the generator \u003cstrong\u003egenerator\u003c/strong\u003e.\u003c/p\u003e\n\n\u003cp align=justify\u003eIn the main class, a screen introducing the user to the game was implemented, followed by a \u003cstrong\u003ewhile\u003c/strong\u003e loop, with the purpose of asking the user for a number again whenever the number is different from the number generated by the program. If the user gets the number right, a victory message is shown on the console and the choice to play again, if the user chooses 's' a new number is generated and the loop is repeated, if 'n' the program is terminated.\u003c/p\u003e\n\n\u003cp align=justify\u003eTo assist the user in discovering the number, the game checks the number entered by the user and compares it with the generated number, in order to give a hint whether it is larger or smaller. Thinking that the user will make several guesses and the game can restart several times, the \u003cstrong\u003eclearConsole\u003c/strong\u003e function was also implemented, which clears the console screen when called during the program execution.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmenicky%2Fguess-the-number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsmenicky%2Fguess-the-number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmenicky%2Fguess-the-number/lists"}