{"id":26954497,"url":"https://github.com/mrlogen/hangman","last_synced_at":"2025-07-09T12:12:31.898Z","repository":{"id":284188267,"uuid":"954110387","full_name":"MrLogEN/hangman","owner":"MrLogEN","description":"Hangman is a simple multiplayer game which has been created for the purpose of \"Client/Server Applications in Java\" course on Prague University of Economics and Business","archived":false,"fork":false,"pushed_at":"2025-06-21T16:40:43.000Z","size":154,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-21T17:31:39.709Z","etag":null,"topics":["game","java","javafx","programming","project","university-course","university-project"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrLogEN.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T15:20:54.000Z","updated_at":"2025-04-16T08:40:22.000Z","dependencies_parsed_at":"2025-04-29T07:27:38.650Z","dependency_job_id":"f5b589ca-28b4-48d5-b4e5-b22057f3c1a1","html_url":"https://github.com/MrLogEN/hangman","commit_stats":null,"previous_names":["mrlogen/hangman"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrLogEN/hangman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrLogEN%2Fhangman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrLogEN%2Fhangman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrLogEN%2Fhangman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrLogEN%2Fhangman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrLogEN","download_url":"https://codeload.github.com/MrLogEN/hangman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrLogEN%2Fhangman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264456033,"owners_count":23611069,"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":["game","java","javafx","programming","project","university-course","university-project"],"created_at":"2025-04-03T02:17:27.659Z","updated_at":"2025-07-09T12:12:31.886Z","avatar_url":"https://github.com/MrLogEN.png","language":"Java","readme":"# Hangman\n\nHangman is a simple game created for the purpose of Client-Server applications in Java course at Prague University\nof Economics and Business.\n## Prerequisites\n### Java JDK 21 \n#### Windows\nYou can download it from [Oracle's website](https://www.oracle.com/java/technologies/downloads/#jdk21-windows)\nor from [OpenJDK's website](https://jdk.java.net/java-se-ri/21)\n\n#### Ubuntu\nYou can download the Java JDK 21 from the official apt repositories or from [OpenJDK's website](https://jdk.java.net/java-se-ri/21)\n```bash\nsudo apt update \u0026\u0026 sudo apt install openjdk-21-jdk\n```\n#### Other Linux distros\nAs a primary method, use your distro's package manager. For rolling release distros the package might not be available\nso you can try to find it in AUR (Arch User Repository) or use the links provided above.\n\n\nThe Oracle's version, you can find here [OpenJDK's website](https://www.oracle.com/java/technologies/downloads/#jdk21-linux)\n\n### Maven\nInstalling Meven can be done by following instructions from Maven [official website](https://maven.apache.org/install.html)\n\n### PMD\nPMD is a static code analyzer that can be used to enforce good programming habits and convetions.\n\n## Run\nClone this repository\n```bash\n# via HTTPS\ngit clone https://github.com/MrLogEN/hangman.git\n# via SSH\ngit clone git@github.com:MrLogEN/hangman.git\n```\n\nChange directory to the cloned repository\n```bash\ncd hangman\n```\nFrom the root of the repository run the following command\n```bash\nmvn clean package\n```\nNow you can run each module individually from the project root.\n```bash\n# Run the server\njava -jar server/target/server-version.jar\n# Run the client\njava -jar client/target/client-version.jar\n```\n\u003e [!WARNING]\\\n\u003e The server must be started before the client, otherwise the client has nothing to connect to.\n\n## Development\nWe enforce certain styling rules using PMD and Checkstyle.\nThese rules are checked before commit using commit hooks.\nFor this reason there is a `setup` script, or rather two scripts, that sets up these hooks in your local repository.\n\n### Windows\nOn Windows run the bat script from the project root.\n```powershell\n.\\setup.bat\n```\n\u003e [!NOTE]\\\n\u003e For running git hooks on windows you need to use Git Bash which\n\u003e comes with git installation by default. Git hooks should work with IntelliJ IDEA out of the box, regardless of OS.\n### Linux\nOn Linux run this script.\n```bash\n./setup.sh\n```\n### Git hooks\nGit hooks run PMD and Checkstyle.\nYou can run these check by yourself from your terminal:\n\n```bash\n# PMD\n# run for each module separately\nmvn -f \"module_name/pom.xml\" pmd:check\n\n#Checkstyle\n# run from the project root\nmvn checkstyle:check\n```\nThese checks will prompt you to fix mistakes if any.\n\n\u003e [!TIP]\\\n\u003e You might want to disable the check when commiting non-java files.\n\u003e You can do that by running\n\u003e `git commit --no-verify`\n\u003e or\n\u003e Editing the VC settings to not run git hooks in your IDE.\n\n## Workflow\nWhen you are working on a new feature, you should create a new issue on GitHub.\n\nProvide some description as this makes it easier for others to understand what you are working on.\nDescribing what you are about to do can help you to understand the problem better.\n![create_new_issue](https://github.com/user-attachments/assets/43ec5494-48d6-4fc3-99ef-ae7f7c3afa93)\n\nWhen you are ready to start working on the issue, create a new branch from the `main` branch.\nThis can be achieved by creating a new branch on GitHub through your issue.\n\n![create_branch_from_issue_button](https://github.com/user-attachments/assets/67c8c2bf-cdfb-4b75-bdb6-042e3e2bc7c0)\n![create_branch_from_issue](https://github.com/user-attachments/assets/0ad04ef0-3301-41ce-857d-26192d7e0cc6)\n\nAs you can see creating the branch this way prefixes the branch with a number. This comes in handy when you try to checkout that branch.\n\nThen you can fetch the newly created branch to your local repository.\n```bash\ngit fetch\ngit checkout branch_name\n```\n\u003e [!WARNING]\\\n\u003e Make sure to fetch the changes first and checkout the branch.\n\u003e Otherwise, you might end up with the branch not existing (on your local clone) and making changes on the `main` branch.\n\nWhen you are done with the feature, you can create a pull request on GitHub. Which can then be either reviewed by others\nwhen you are not confident with your changes or merged by yourself when you are confident.\n\n### Commit frequency\nIt is advised to commit often. This way you can easily revert changes if something goes wrong.\nIt is also easier to understand what you have done when you have smaller commits.\n\nCommit message should be in the imperative mood. This means that the message should be a command.\nFor example, `Add new feature` or `Fix bug` NOT `Adding a feature` etc.\n\n\u003e Don't commit unrelated changes in one commit. This makes it harder to understand what you have done.\n\n### Rebasing and Squashing\nSometimes when you commit often the history can become cluttered. In this case, you can squash commits.\n\nSquashing can be done through interactive rebase.\n```bash\ngit rebase -i HEAD~n # n is the number of commits you want to use for rebase\n```\nYou can also specify commit hash instead of `HEAD~n` to rebase from a specific commit.\n\nWhen you run this command, you will be presented with a list of commits in your default editor.\n\n\u003e [!TIP]\\\n\u003e You can change the git's default editor by running `git config --global core.editor \"editor_name\"`\n\nLet's say you have 5 commits and you want to squash them into one. This is how the list would look like.\n```bash\npick b01c43f First commit\npick ec79f09 Second commit\npick 59d2be9 Third commit\npick 48faf16 Fourth commit\npick 5868bc3 Fifth commit\n\n# Rebase 5fd6d92..5868bc3 onto 5fd6d92 (5 commands)\n#\n# Commands:\n# p, pick \u003ccommit\u003e = use commit\n# r, reword \u003ccommit\u003e = use commit, but edit the commit message\n# e, edit \u003ccommit\u003e = use commit, but stop for amending\n# s, squash \u003ccommit\u003e = use commit, but meld into previous commit\n# f, fixup [-C | -c] \u003ccommit\u003e = like \"squash\" but keep only the previous\n#                    commit's log message, unless -C is used, in which case\n#                    keep only this commit's message; -c is same as -C but\n#                    opens the editor\n# x, exec \u003ccommand\u003e = run command (the rest of the line) using shell\n# b, break = stop here (continue rebase later with 'git rebase --continue')\n# d, drop \u003ccommit\u003e = remove commit\n# l, label \u003clabel\u003e = label current HEAD with a name\n# t, reset \u003clabel\u003e = reset HEAD to a label\n# m, merge [-C \u003ccommit\u003e | -c \u003ccommit\u003e] \u003clabel\u003e [# \u003coneline\u003e]\n# .       create a merge commit using the original merge commit's\n# .       message (or the oneline, if no original merge commit was\n# .       specified); use -c \u003ccommit\u003e to reword the commit message\n#\n# These lines can be re-ordered; they are executed from top to bottom.\n#\n# If you remove a line here THAT COMMIT WILL BE LOST.\n#\n# However, if you remove everything, the rebase will be aborted.\n\n```\nAs you can see there are 5 commits. You can see their hashes and commit messages. The commits are prefixed with `pick`.\nThat means that these commits will be picked up by the rebase. As you can see the interactive rebase provides you with \na list of commands that you can use to manipulate the commits. \n\nIn our case we want to use `squash` or `s` command to squash the commits. Let's say we want to squash the last commit \nit would look like this.\n```bash\npick b01c43f First commit\npick ec79f09 Second commit\npick 59d2be9 Third commit\npick 48faf16 Fourth commit\nsquash 5868bc3 Fifth commit\n```\n\nWhen you are satisfied with the changes you can save and close the editor. The rebase will start and you will be\nprompted to edit the commit message. If you are squashing multiple commits which are separated by pick commands,\nyou will be prompted to change the commit message for each commit that you are squashing into.\n\n```bash\npick b01c43f First commit\nsquash ec79f09 Second commit\npick 59d2be9 Third commit\npick 48faf16 Fourth commit\nsquash 5868bc3 Fifth commit\n```\n\nMore detailed tutorial for interactive rebase can be found on [Sitepoint](https://www.sitepoint.com/git-interactive-rebase-guide/)\n\nIt is a good practice to rebase your branch on the `main` branch before creating a pull request.\n```bash\ngit fetch origin\ngit rebase origin/main\n```\nYou should always fetch the changes from remote before rebasing. This way you can avoid conflicts.\n\nAfter any form of rebase it is necessary to force push the changes to the remote repository.\n```bash\ngit push -f\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlogen%2Fhangman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlogen%2Fhangman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlogen%2Fhangman/lists"}