Remove some system outs

This commit is contained in:
jancoow
2015-06-19 10:25:44 +02:00
parent 2ed5ceeaba
commit d86d4dc62e
8 changed files with 12 additions and 56 deletions
-21
View File
@@ -1,21 +0,0 @@
package audio.io;
import java.io.File;
import java.io.IOException;
import audio.Song;
public class Main {
public static void main(String[] args) {
Song s = null;
try {
s = JSONReader.readSong(new File("C:\\Users\\Kenneth\\Development\\Java Development\\SimApplicatie\\Arcade\\songs\\NAME_OF_SONG\\NAME_OF_SONG.csf"));
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("---");
System.out.println(s);
}
}
-2
View File
@@ -32,13 +32,11 @@ public class GameControl implements JoystickListener, ButtonListener, ActionList
@Override
public void buttonPressed(ButtonEvent e) {
// System.out.println("Game control, button pressed: "+e.getButton().getButtonID());
gsm.buttonPressed(e);
}
@Override
public void buttonReleased(ButtonEvent e) {
// System.out.println("Game control, button released: "+e.getButton().getButtonID());
gsm.buttonReleased(e);
}
+11 -27
View File
@@ -14,7 +14,6 @@ import control.joystick.JoystickHandler;
public class NetworkHandler implements Runnable{
DatagramSocket udp;
DatagramSocket udpsend;
String host;
int port;
@@ -28,8 +27,6 @@ public class NetworkHandler implements Runnable{
ButtonHandler bth;
JoystickHandler jth;
InetAddress adr;
public NetworkHandler(String host, int port, ButtonHandler bth, JoystickHandler jth)
{
this.host = host;
@@ -43,19 +40,8 @@ public class NetworkHandler implements Runnable{
send = new byte[1024];
receive = new byte[1024];
try {
adr = InetAddress.getByName("192.168.1.5");
} catch (UnknownHostException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
// try {
// udp = new DatagramSocket(1112);
// } catch (SocketException e) {
// e.printStackTrace();
// }
try {
udpsend = new DatagramSocket();
try {
udp = new DatagramSocket(1113);
} catch (SocketException e) {
e.printStackTrace();
}
@@ -78,12 +64,7 @@ public class NetworkHandler implements Runnable{
private void send(String str)
{
send = str.getBytes();
try {
udpsend.send(new DatagramPacket(send, send.length, adr, port));
} catch (IOException e) {
e.printStackTrace();
}
}
public void close()
@@ -100,19 +81,19 @@ public class NetworkHandler implements Runnable{
{
DatagramPacket receivePacket = new DatagramPacket(receive, receive.length);
try {
udpsend.receive(receivePacket);
udp.receive(receivePacket);
} catch (IOException e) {
e.printStackTrace();
}
String sentence = new String( receivePacket.getData());
sentence = sentence.trim();
String[] controls = sentence.split("\\|");
int[] control = new int[controls.length];
for(int i=0; i<controls.length; i++){
for(int i=0; i<controls.length; i++)
control[i] = Integer.parseInt(controls[i]);
}
for(int i = 0; i < 7; i++){
if(control[i] != ButtonHandler.getButton(i).pressed)
{
@@ -178,6 +159,9 @@ public class NetworkHandler implements Runnable{
JoystickHandler.j.setPosition(Position.DOWN);
jth.onJoystickMoved(JoystickHandler.j);
}
}else {
JoystickHandler.j.setPosition(Position.CENTER);
}
}
+1
View File
@@ -1 +1,2 @@
/SQLConnector.class
/WebcamUploader.class
-1
View File
@@ -94,7 +94,6 @@ public class GameOverState extends GameState {
}
uploaded = true;
System.out.println(id);
}else{
gsm.setState(State.MENU_STATE);
}
-1
View File
@@ -222,7 +222,6 @@ public class MenuState extends GameState {
difSelect = 0;
}
//System.out.println(difSelect);
}
else if(e.getJoystick().getPos() == Position.CENTER)
{
-3
View File
@@ -107,8 +107,6 @@ public class PlayState extends GameState {
if(progress > sh.getCurrentSongInstance().getEndTime() + Enemy.secondsToEnd*1000*2)
endGame();
// System.out.println(progress - oldProgress + " / " + area.paths.get(player.getIndex()).getEnemysInPath().size());
oldProgress = progress;
Enemy closedEnemy = null;
@@ -120,7 +118,6 @@ public class PlayState extends GameState {
while (enemyIterator.hasNext()) {
Enemy e = enemyIterator.next();
// System.out.println("Path: "+e.getIndex()+"\tDistance: "+(Enemy.distanceToOctagon-e.getDistanceFromStart()));
if (e.getDistanceFromStart() > Enemy.distanceToOctagon + (sizeOfEnemy * 1.5)) {
enemyIterator.remove();
lifePoints -= 5;
@@ -18,7 +18,6 @@ public class HighscoreName {
int marge = (int) (Math.floor(nameLength/2)-1)*spacing;
x -= (double)HighscoreLetter.charLength*(nameLength/2.0) + marge;
System.out.println(x);
for(int i = 0; i < letters.length; i++){
letters[i] = new HighscoreLetter(characters, x+(HighscoreLetter.charLength*i)+(spacing*i), y);
}