Skip to content

Commit f06f6d6

Browse files
committed
repush
1 parent 4109e20 commit f06f6d6

File tree

2 files changed

+72
-8
lines changed

2 files changed

+72
-8
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ jobs:
4141
tag_name: ${{ github.ref }}
4242
release_name: Release ${{ github.ref }}
4343

44+
- name: Attach JAR to Release
45+
uses: actions/upload-release-asset@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
upload_url: ${{ steps.create_release.outputs.upload_url }}
50+
asset_path: ${{ env.OUT_DIR }}/${{ env.FILE_NAME }}-${{ env.VERSION }}.jar
51+
asset_name: ${{ env.FILE_NAME }}-${{ env.VERSION }}.jar
52+
asset_content_type: application/java-archive
53+
54+
4455
macos_build:
4556
needs: build
4657
runs-on: macOS-latest

README.md

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,73 @@ The AI will also use alpha-beta pruning to reduce the number of nodes that need
1414

1515
## Running the Program
1616

17-
- Make sure you have JRE installed on your computer. You can download JRE [here](https://www.oracle.com/java/technologies/javase-jre8-downloads.html).
17+
- Make sure you have JRE installed on your computer. You can download JRE [here](https://adoptium.net/) or [here](https://www.oracle.com/java/technologies/javase-jre8-downloads.html).
1818

1919
You can download the release version of the Game from the latest release [here](https://github.com/vmsaif/connect4-with-minimax-algorithm-in-java/releases). The program is packaged as a JAR file. You can run the program by double-clicking on the JAR file.
2020

21-
After downloading the JAR file, you might need to give the JAR file permission to run. You can do this by running the following command in the terminal:
21+
## **Ubuntu**
2222

23-
- Go the directory where the JAR file is downloaded
24-
- `cd ~/Downloads` (or wherever the JAR file is downloaded)
25-
- Run `chmod +x connect4.jar`
23+
1. **Installing Java** (if it's not already installed):
24+
```bash
25+
sudo apt update
26+
sudo apt install default-jre
27+
```
2628

29+
2. **Navigate to the Download Location**:
30+
```bash
31+
cd ~/Downloads
32+
```
2733

34+
3. **Provide Execute Permissions** (Optional, but useful if you want to execute it directly):
35+
```bash
36+
chmod +x connect4-1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
37+
```
2838

29-
## Compiling and Running
39+
4. **Run the JAR File**:
40+
```bash
41+
java -jar connect4-1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
42+
```
43+
44+
## **macOS**
45+
46+
1. **Navigate to the Download Location** (using Terminal):
47+
```bash
48+
cd ~/Downloads
49+
```
50+
51+
3. **Provide Execute Permissions** (Optional):
52+
```bash
53+
chmod +x connect4-1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
54+
```
55+
56+
4. **Run the JAR File**:
57+
```bash
58+
java -jar connect4-1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
59+
```
60+
61+
## **Windows**
62+
63+
1. **Confirming Java**:
64+
Ensure that Java is installed and added to your `PATH` so that it can be accessed from the command prompt. (Most installers will do this for you.) To check if Java is installed, run the following command in Command Prompt or PowerShell:
65+
```bash
66+
java -version
67+
```
68+
If Java is installed, you should see the version number. If you see an error, you need to install Java. See above for instructions on installing Java.
69+
70+
2. **Navigate to the Download Location** (using Command Prompt or PowerShell):
71+
```bash
72+
cd c:\Users\username\Downloads # Replace username with your username
73+
```
74+
75+
3. **Run the JAR File**:
76+
```bash
77+
java -jar connect4-1.0.0.jar
78+
```
79+
80+
In all cases, once the commands are followed, the Java application packaged inside the JAR file should start running.
81+
82+
83+
## Compiling and Running (Advanced)
3084
### Compiling
3185
The game is written in Java and can be compiled using the following steps:
3286

@@ -35,6 +89,5 @@ The game is written in Java and can be compiled using the following steps:
3589
- Run the command `java -cp bin/ App` to run the game.
3690

3791

38-
3992
## Bugs:
40-
I have not found any bugs in the program yet. If you find any, please let me know.
93+
I have not found any bugs in the program yet. If you find any, please let me know by opening an issue from the issue tab.

0 commit comments

Comments
 (0)