Skip to content

Commit 9eedec4

Browse files
committed
Merge remote-tracking branch 'origin/master' into release
2 parents 35f86f6 + 34c6de5 commit 9eedec4

5 files changed

Lines changed: 41 additions & 32 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
2929
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
3030
- name: Setup Gradle
31-
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5.0.1
31+
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
3232

3333
- name: Build with Gradle Wrapper
3434
run: ./gradlew build
@@ -61,4 +61,4 @@ jobs:
6161
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
6262
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
6363
- name: Generate and submit dependency graph
64-
uses: gradle/actions/dependency-submission@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5.0.1
64+
uses: gradle/actions/dependency-submission@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2

README.md

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A simple number guessing game where you try to guess a randomly generated number
1010

1111
**Features:**
1212
- Swing-based GUI (default)
13-
- Console mode (use `--console` flag)
13+
- Console mode (use `--console` or `-c`)
1414
- High score tracking with usernames
1515
- Persistent score storage
1616
- Cross-platform
@@ -19,68 +19,78 @@ A simple number guessing game where you try to guess a randomly generated number
1919

2020
### Installation via Debian Package (APT)
2121

22-
For Debian/Ubuntu and derivatives (recommended for terminal usage):
22+
For Debian/Ubuntu and derivatives:
2323

24-
1. Download the `.deb` package from the [latest release](https://github.com/Project516/NumberGuessingGame/releases)
24+
1. Download the `NumberGuessingGame.deb` package from the [latest release](https://github.com/Project516/NumberGuessingGame/releases)
2525

2626
You can use curl to do it from the command line:
2727
```bash
28-
curl -s -L -o numberguessinggame.deb https://github.com/Project516/NumberGuessingGame/releases/latest/download/numberguessinggame.deb
28+
curl -s -L -o NumberGuessingGame.deb https://github.com/Project516/NumberGuessingGame/releases/latest/download/NumberGuessingGame.deb
2929
```
3030
2. Install it:
3131
```bash
3232
sudo apt update # Update packages
33-
sudo apt install ./numberguessinggame.deb # From directory with the deb package
33+
sudo apt install ./NumberGuessingGame.deb # From directory with the deb package
3434
sudo apt install -f # Install dependencies
3535
echo 'export PATH=$PATH:/usr/games' >> ~/.bashrc # Add games directory to user PATH
3636
source ~/.bashrc
3737
```
38-
3. Run from anywhere in your terminal:
38+
3. Run from anywhere in your terminal (launches GUI by default):
3939
```bash
40-
numberguessinggame
40+
NumberGuessingGame
41+
```
42+
43+
To run in console mode, use the `-c` flag:
44+
```bash
45+
numberguessinggame -c
4146
```
4247

4348
To uninstall:
4449
```bash
45-
sudo apt remove numberguessinggame
50+
sudo apt remove NumberGuessingGame
4651
sudo apt autoremove -y # Remove dependencies
4752
```
4853

4954
### Installation via Fedora/RPM Package (DNF/YUM)
5055

5156
For Fedora, RHEL, CentOS, and other RPM-based distributions:
5257

53-
1. Download the `.rpm` package from the [latest release](https://github.com/Project516/NumberGuessingGame/releases)
58+
1. Download the `NumberGuessingGame.rpm` package from the [latest release](https://github.com/Project516/NumberGuessingGame/releases)
5459

5560
You can use curl to do it from the command line:
5661
```bash
57-
curl -s -L -o numberguessinggame.rpm https://github.com/Project516/NumberGuessingGame/releases/latest/download/numberguessinggame.rpm
62+
curl -s -L -o NumberGuessingGame.rpm https://github.com/Project516/NumberGuessingGame/releases/latest/download/NumberGuessingGame.rpm
5863
```
5964
2. Install it:
6065
```bash
61-
sudo dnf install ./numberguessinggame.rpm
66+
sudo dnf install ./NumberGuessingGame.rpm
6267
```
6368
Or on older systems:
6469
```bash
65-
sudo yum install ./numberguessinggame.rpm
70+
sudo yum install ./NumberGuessingGame.rpm
6671
```
67-
3. Run from anywhere in your terminal:
72+
3. Run from anywhere in your terminal (launches GUI by default):
73+
```bash
74+
NumberGuessingGame
75+
```
76+
77+
To run in console mode, use the `-c` flag:
6878
```bash
69-
numberguessinggame
79+
numberguessinggame -c
7080
```
7181

7282
To uninstall:
7383
```bash
74-
sudo dnf remove numberguessinggame
84+
sudo dnf remove NumberGuessingGame
7585
```
7686
Or on older systems:
7787
```bash
78-
sudo yum remove numberguessinggame
88+
sudo yum remove NumberGuessingGame
7989
```
8090

8191
### Standalone Packages with Bundled JRE (Recommended)
8292

83-
Download the platform-specific package with bundled JRE from the [latest release](https://github.com/project516/numberguessinggame/releases):
93+
Download the platform-specific package with bundled JRE from the [latest release](https://github.com/project516/NumberGuessingGame/releases):
8494

8595
- **Windows**: `NumberGuessingGame-windows.zip`
8696
- **macOS**: `NumberGuessingGame-macos.zip`
@@ -96,7 +106,7 @@ Run `run.sh`
96106

97107
### Manual Installation (Requires Java)
98108

99-
Download the `archive.zip` from the [latest release](https://github.com/project516/numberguessinggame/releases)
109+
Download the `archive.zip` from the [latest release](https://github.com/project516/NumberGuessingGame/releases)
100110

101111
#### Requirements
102112

@@ -138,10 +148,9 @@ The game features both a graphical user interface (GUI) and a console mode.
138148
To run the classic console version, use the `--console` or `-c` flag:
139149

140150
```bash
141-
java -jar app.jar --console
142-
# or
143-
./run.sh --console # Linux/Mac
144-
run.bat --console # Windows
151+
java -jar app.jar --console # or use -c
152+
./run.sh --console # Linux/Mac, can also use -c
153+
run.bat --console # Windows, can also use -c
145154
```
146155

147156
In console mode:
@@ -154,7 +163,7 @@ In console mode:
154163

155164
### High Scores
156165

157-
The game automatically tracks high scores (games won with the least guesses). High scores are stored in your home directory at `~/.numberguessinggame/highscores.properties`.
166+
The game automatically tracks high scores (games won with the least guesses). High scores are stored in your home directory at `~/.NumberGuessingGame/highscores.properties`.
158167

159168
- The top 10 scores are kept
160169
- Scores are sorted by the number of guesses (least is best)
@@ -195,21 +204,21 @@ Run `.\gradlew build` and `.\package.bat` from the project root.
195204
**On Linux/Mac:**
196205
Run `./package.sh` from the project root.
197206

198-
This will create `archive.zip` containing the application, run scripts, README, and LICENSE. The archive can be released to GitHub Releases.
207+
This will create `archive.zip` containing the application, run scripts, README, and LICENSE.
199208

200209
#### Debian Package
201210

202211
**On Linux:**
203212
Run `./package-deb.sh` from the project root.
204213

205-
This will create `numberguessinggame.deb` which can be installed via `apt`/`dpkg` on Debian-based systems. The package can be released to GitHub Releases for easy distribution.
214+
This will create `NumberGuessingGame.deb` which can be installed via `apt`/`dpkg` on Debian-based systems.
206215

207216
#### Fedora/RPM Package
208217

209218
**On Linux (requires rpm-build):**
210219
Run `./package-rpm.sh` from the project root.
211220

212-
This will create `numberguessinggame-1.0.0-1.noarch.rpm` which can be installed via `dnf`/`yum`/`rpm` on Fedora, RHEL, CentOS, and other RPM-based systems. The package can be released to GitHub Releases for easy distribution.
221+
This will create `NumberGuessingGame.rpm` which can be installed via `dnf`/`yum`/`rpm` on Fedora, RHEL, CentOS, and other RPM-based systems.
213222

214223
#### Platform-Specific Packages with Bundled JRE
215224

@@ -222,4 +231,4 @@ Run the following scripts to create platform-specific packages with bundled JRE:
222231
./package-linux.sh # Creates NumberGuessingGame-linux.tar.xz
223232
```
224233

225-
These packages include a bundled JRE and do not require Java to be installed on the target system. They are automatically built and uploaded to GitHub Releases via GitHub Actions.
234+
These packages include a bundled JRE and do not require Java to be installed on the target system.

app/src/main/java/dev/project516/NumberGuessingGame/HighScoreManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* scores from persistent storage.
1919
*/
2020
public class HighScoreManager {
21-
private static final String CONFIG_DIR = ".numberguessinggame";
21+
private static final String CONFIG_DIR = ".NumberGuessingGame";
2222
private static final String HIGH_SCORE_FILE = "highscores.properties";
2323
private static final int MAX_HIGH_SCORES = 10;
2424

app/src/test/java/dev/project516/NumberGuessingGame/HighScoreManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/** Unit tests for the HighScoreManager class. */
1616
class HighScoreManagerTest {
17-
private static final String TEST_CONFIG_DIR = ".numberguessinggame_test";
17+
private static final String TEST_CONFIG_DIR = ".NumberGuessingGame_test";
1818

1919
private void cleanup() {
2020
// Clean up test files

debian-package/usr/games/numberguessinggame

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Wrapper script to launch Number Guessing Game
88

9-
java -jar /usr/share/games/numberguessinggame/game.jar --console "$@"
9+
java -jar /usr/share/games/numberguessinggame/game.jar "$@"

0 commit comments

Comments
 (0)