|
@@ -196,7 +196,9 @@ public class Match implements Runnable {
|
|
|
|
|
|
|
|
String ballsinfo = ",";
|
|
String ballsinfo = ",";
|
|
|
for (Ball b : balls) {
|
|
for (Ball b : balls) {
|
|
|
- ballsinfo += b.getX() + "|" + b.getY() + "|" + b.getSize() + "|" + b.getColor().getRGB() + "|";
|
|
|
|
|
|
|
+ String color = Integer.toHexString(b.getColor().getRGB());
|
|
|
|
|
+ color = color.substring(2, color.length());
|
|
|
|
|
+ ballsinfo += b.getX() + "|" + b.getY() + "|" + b.getSize() + "|0x" + color + "|";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String linesinfo = ",";
|
|
String linesinfo = ",";
|
|
@@ -241,7 +243,8 @@ public class Match implements Runnable {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void stopMatch() {
|
|
public void stopMatch() {
|
|
|
- timer.cancel();
|
|
|
|
|
|
|
+ if(timer != null)
|
|
|
|
|
+ timer.cancel();
|
|
|
try {
|
|
try {
|
|
|
nwuser1.close();
|
|
nwuser1.close();
|
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|