Skip to content

Commit 45a26b4

Browse files
committed
Update compile and readme
1 parent 7c4ca1f commit 45a26b4

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

Makefile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@ ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
22

33
all: procLocal preFix class jar done
44

5+
eclipse: procLocal preFix
6+
57
# Hard compile with th existing java file
68
hard: class jar done
79

10+
procLocal:
11+
processing-java --sketch="$(ROOT_DIR)" --output="$(ROOT_DIR)/build/processing" --force --build
12+
13+
# Processing java preprocesor fix
14+
preFix:
15+
cd build; sed -i -e "s/.* size commented out by preprocessor .*;/size(1000, 1000);/" processing/source/CardGame.java
16+
817
# First compile with processing
918
class:
1019
cd build; javac -target 1.8 -source 1.8 -d out -cp lib/gifAnimation.jar:buildlib/sound.jar:lib/javamp3-1.0.4.jar:lib/1.8/core.jar:lib/jogl-all.jar processing/source/CardGame.java
1120

1221
# Then compile with javac
1322
jar:
14-
cd build; jar cvfm Main.jar ./META-INF/MANIFEST.MF -C ./out . ../data
23+
cd build; jar -cvfm Main.jar ./META-INF/MANIFEST.MF -C ./out . ../data lib
1524

1625
done:
1726
@echo "Done building"
1827
@echo "Main.jar located in build directory"
19-
20-
# Builds with processing
21-
# proc:
22-
# cd /opt/hostedtoolcache/processing/3.5.4/x64; ./processing-java --sketch="$(ROOT_DIR)" --output="$(ROOT_DIR)/build/processing" --force --build
23-
24-
procLocal:
25-
processing-java --sketch="$(ROOT_DIR)" --output="$(ROOT_DIR)/build/processing" --force --build
26-
27-
# Processing java preprocesor fix
28-
preFix:
29-
cd build; sed -i -e "s/.* size commented out by preprocessor .*;/size(1000, 1000);/" processing/source/CardGame.java

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ Card game for AP Computer Science AB 2022-2023 in Ivan Rico's class
1111
- **Requires [Processing v3.5.1](https://processing.org/download)**
1212
- Then in the processing app go to in the top bar: `Tools` -> `Install processing-java`
1313
- ```bash
14-
make
14+
make eclipse
1515
```
16-
- Then `Main.jar` will be in the `build` folder
16+
17+
- Then compile to a jar file in eclipse (**Instructions missing**)
18+
<!-- - Then `Main.jar` will be in the `build` folder -->
1719

1820
## Running
1921

@@ -24,14 +26,13 @@ Card game for AP Computer Science AB 2022-2023 in Ivan Rico's class
2426

2527
## Project Requirements
2628

27-
- 11/27 High Low Card Game
28-
- Type in name
29-
- 52 Card deck
29+
- Random positions of cards
30+
- 52 cards, but 7 rounds
3031
- 4 Suits (clubs, spades, hearts, diamonds)
3132
- A-10, J, Q, K
3233
- Tracks total correct
3334
- Tracks current streak
3435
- Tracks highest streak
3536
- Calculated score with bonus based on streak (ex: +50% bonus score each time streak increases)
36-
- Can view name, score, total correct and highest streak for each player (this does not have to carry over when you close the app)
37+
- Can view score, total correct and highest streak for each player (this does not have to carry over when you close the app)
3738
- Can exit game at any point

build/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Main-Class: CardGame
2-
Class-path: lib/gifAnimation.jar lib/sound.jar lib/javamp3-1.0.4.jar lib/1.7/core.jar lib/jogl-all.jar
2+
Class-path: ./lib/gifAnimation.jar ./lib/sound.jar ./lib/javamp3-1.0.4.jar ./lib/1.7/core.jar ./lib/jogl-all.jar

0 commit comments

Comments
 (0)