- fixed graphics issues
7
.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="build/ConnectFour.jar"/>
|
||||
<classpathentry kind="output" path="build/compiled"/>
|
||||
</classpath>
|
17
.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>connect-four</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Main-Class: de.itsblue.ConnectFour.ConnectFour
|
||||
Class-Path: .
|
|
@ -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
|
||||
|
|
BIN
res/test.png
Before Width: | Height: | Size: 5.7 KiB |
|
@ -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"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,6 +53,7 @@ public class RemotePlayerClient extends RemotePlayer {
|
|||
this.startListening();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleResponse(String response) {
|
||||
System.out.println("[SOCKET] Got: " + response);
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ public class RemotePlayerServer extends RemotePlayer {
|
|||
this.startListening();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleResponse(String response) {
|
||||
if (response.startsWith("doMove")) {
|
||||
if (this.isMyTurn)
|
||||
|
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.7 KiB |