Skip to content

Commit 34c6de5

Browse files
authored
Merge pull request #129 from Project516/deb-and-dnf-fix
some fixes
2 parents 2124134 + 0c2ef57 commit 34c6de5

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

README.md

Lines changed: 19 additions & 10 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,9 +19,9 @@ 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
@@ -35,11 +35,16 @@ For Debian/Ubuntu and derivatives (recommended for terminal usage):
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
4040
NumberGuessingGame
4141
```
4242

43+
To run in console mode, use the `-c` flag:
44+
```bash
45+
numberguessinggame -c
46+
```
47+
4348
To uninstall:
4449
```bash
4550
sudo apt remove NumberGuessingGame
@@ -50,7 +55,7 @@ sudo apt autoremove -y # Remove dependencies
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
@@ -64,11 +69,16 @@ For Fedora, RHEL, CentOS, and other RPM-based distributions:
6469
```bash
6570
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):
6873
```bash
6974
NumberGuessingGame
7075
```
7176

77+
To run in console mode, use the `-c` flag:
78+
```bash
79+
numberguessinggame -c
80+
```
81+
7282
To uninstall:
7383
```bash
7484
sudo dnf remove NumberGuessingGame
@@ -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:

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)