diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..5677f01
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..eec31d5
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ connect-four
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/build/MANIFEST.MF b/MANIFEST.MF
similarity index 57%
rename from build/MANIFEST.MF
rename to MANIFEST.MF
index c7523de..eb6e07b 100644
--- a/build/MANIFEST.MF
+++ b/MANIFEST.MF
@@ -1 +1,3 @@
+Manifest-Version: 1.0
Main-Class: de.itsblue.ConnectFour.ConnectFour
+Class-Path: .
diff --git a/build/build.sh b/build/build.sh
index c61569a..f0d5e54 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -7,7 +7,7 @@ else
cd ./compiled
find ../../src -name "*.java" > sources.txt
javac -d ./ @sources.txt
- find ../../res -name "*" > compiledSources.txt
- find -name "*.class" > compiledSources.txt
- jar cvmf ../MANIFEST.MF ../ConnectFour.jar ../../res/* @compiledSources.txt
+ find ./ -name "*.class" > compiledSources.txt
+ cp find ../../src -name "res" ./ >> compiledSources.txt
+ jar cvmf ../../MANIFEST.MF ../ConnectFour.jar @compiledSources.txt
fi
diff --git a/res/test.png b/res/test.png
deleted file mode 100755
index 6bd23fd..0000000
Binary files a/res/test.png and /dev/null differ
diff --git a/src/de/itsblue/ConnectFour/PlateContainer.java b/src/de/itsblue/ConnectFour/PlateContainer.java
index b57c37e..863ff27 100644
--- a/src/de/itsblue/ConnectFour/PlateContainer.java
+++ b/src/de/itsblue/ConnectFour/PlateContainer.java
@@ -57,10 +57,10 @@ public class PlateContainer extends Canvas {
*/
PlateContainer() {
// initialize all images
- containerImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/res/container.png"));
- plateRedImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/res/plateRed.png"));
- plateYellowImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/res/plateYellow.png"));
- highlightImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/res/highlight.png"));
+ containerImg = Toolkit.getDefaultToolkit().getImage(ConnectFour.class.getResource("res/container.png"));
+ plateRedImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("res/plateRed.png"));
+ plateYellowImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("res/plateYellow.png"));
+ highlightImg = Toolkit.getDefaultToolkit().getImage(getClass().getResource("res/highlight.png"));
}
/**
diff --git a/src/de/itsblue/ConnectFour/player/RemotePlayerClient.java b/src/de/itsblue/ConnectFour/player/RemotePlayerClient.java
index 3ba165d..d5b8e0f 100644
--- a/src/de/itsblue/ConnectFour/player/RemotePlayerClient.java
+++ b/src/de/itsblue/ConnectFour/player/RemotePlayerClient.java
@@ -53,7 +53,8 @@ public class RemotePlayerClient extends RemotePlayer {
this.startListening();
}
- public void handleResponse(String response) {
+ @Override
+ public void handleResponse(String response) {
System.out.println("[SOCKET] Got: " + response);
if (response.startsWith("setUsingPlateType")) {
diff --git a/src/de/itsblue/ConnectFour/player/RemotePlayerServer.java b/src/de/itsblue/ConnectFour/player/RemotePlayerServer.java
index 4410fa4..310fca4 100644
--- a/src/de/itsblue/ConnectFour/player/RemotePlayerServer.java
+++ b/src/de/itsblue/ConnectFour/player/RemotePlayerServer.java
@@ -64,7 +64,8 @@ public class RemotePlayerServer extends RemotePlayer {
this.startListening();
}
- public void handleResponse(String response) {
+ @Override
+ public void handleResponse(String response) {
if (response.startsWith("doMove")) {
if (this.isMyTurn)
this.doMove(Integer.parseInt(response.split(" ")[1]));
diff --git a/res/container.png b/src/de/itsblue/ConnectFour/res/container.png
similarity index 100%
rename from res/container.png
rename to src/de/itsblue/ConnectFour/res/container.png
diff --git a/res/highlight.png b/src/de/itsblue/ConnectFour/res/highlight.png
similarity index 100%
rename from res/highlight.png
rename to src/de/itsblue/ConnectFour/res/highlight.png
diff --git a/res/plateRed.png b/src/de/itsblue/ConnectFour/res/plateRed.png
similarity index 100%
rename from res/plateRed.png
rename to src/de/itsblue/ConnectFour/res/plateRed.png
diff --git a/res/plateYellow.png b/src/de/itsblue/ConnectFour/res/plateYellow.png
similarity index 100%
rename from res/plateYellow.png
rename to src/de/itsblue/ConnectFour/res/plateYellow.png
diff --git a/src/de/itsblue/ConnectFour/res/test.png b/src/de/itsblue/ConnectFour/res/test.png
deleted file mode 100755
index 6bd23fd..0000000
Binary files a/src/de/itsblue/ConnectFour/res/test.png and /dev/null differ