Skip to content

Commit 308f273

Browse files
committed
cheerpj
1 parent 3a6ae08 commit 308f273

8 files changed

Lines changed: 36 additions & 13 deletions

File tree

.github/workflows/javadoc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323

2424
- name: Generate JavaDoc
2525
run: ./gradlew javadoc
26+
27+
-name: Copy Cheerpj
28+
run: ./cheerpj.sh
2629

2730
- name: Deploy to GitHub Pages
2831
uses: peaceiris/actions-gh-pages@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ NumberGuessingGame-macos/
3535
NumberGuessingGame-linux/
3636
NumberGuessingGame-windows.zip
3737
NumberGuessingGame-macos.zip
38-
NumberGuessingGame-linux.tar.gz
38+
NumberGuessingGame-linux.tar.gz
39+

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
A simple number guessing game where you try to guess a randomly generated number. The game features both a user-friendly graphical interface (GUI) and a classic console mode. The GUI provides visual feedback with color-coded hints and tracks your progress in real-time.
44

55
**Features:**
6-
- 🎮 Modern Swing-based GUI (default)
7-
- 💻 Classic console mode (use `--console` flag)
8-
- 🎯 Visual feedback with color coding
9-
- 📊 Real-time guess counter
10-
- ⌨️ Keyboard shortcuts for quick navigation
11-
- 🌍 Cross-platform compatible (Windows, macOS, Linux)
6+
- Swing-based GUI (default)
7+
- Console mode (use `--console` flag)
8+
- Cross-platform
129

1310
## Installation & Running
1411

cheerpj.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
./gradlew build
4+
rm -f cheerpj/app.jar
5+
cp app/build/libs/app.jar cheerpj
6+
mkdir -p app/build/docs/javadoc/cheerpj
7+
cp -f cheerpj/* app/build/docs/javadoc/cheerpj/

cheerpj/app.jar

14.6 KB
Binary file not shown.

cheerpj/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>CheerpJ test</title>
6+
<script src="https://cjrtnc.leaningtech.com/4.2/loader.js"></script>
7+
</head>
8+
<body>
9+
<script>
10+
(async function () {
11+
await cheerpjInit();
12+
cheerpjCreateDisplay(800, 600);
13+
await cheerpjRunJar("/app/app.jar");
14+
})();
15+
</script>
16+
</body>
17+
</html>

test-gui.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22

3-
cd app
4-
gradle build
5-
java -jar build/libs/app.jar
3+
./gradlew build
4+
java -jar app/build/libs/app.jar

test.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22

3-
cd app
4-
gradle build
5-
java -jar build/libs/app.jar --console
3+
./gradlew build
4+
java -jar app/build/libs/app.jar --console

0 commit comments

Comments
 (0)