Removed all souts
This commit is contained in:
@@ -136,8 +136,6 @@ public class MainGame extends Game implements ClientCallback {
|
||||
TextureRegion[][] characters = TextureRegion.split(texture, 32, 32);
|
||||
this.team = new Team();
|
||||
this.enemyTeam = new Team();
|
||||
|
||||
System.out.println(this.chosenFaction);
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
GameCharacter temp = new Hacker("hacker" + i, characters[5][0], new BodySwap("test"));
|
||||
mapRenderer.getGameTiles()[1][i].visit(temp);
|
||||
@@ -176,7 +174,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
try {
|
||||
t.start();
|
||||
} catch (Exception e) {
|
||||
System.out.println("There was an error connecting : " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.net.Socket;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Client implements Runnable {
|
||||
private final int port;
|
||||
@@ -33,12 +32,10 @@ public class Client implements Runnable {
|
||||
this.connect();
|
||||
try {
|
||||
if (this.receiveThread != null){
|
||||
System.out.println("[CLIENT RUN] starting receive thread");
|
||||
this.receiveThread.start();
|
||||
}
|
||||
else System.out.println("[CLIENT] couldnt connect to server, the receiving thread was null!");
|
||||
} catch (Exception e) {
|
||||
System.out.println("[CLIENT] error connecting to server: " + e.getMessage() + ", cause: " + e.getCause().toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -47,7 +44,6 @@ public class Client implements Runnable {
|
||||
* Connects the client to the server.
|
||||
*/
|
||||
public void connect() {
|
||||
System.out.println("[CLIENT] connecting to server on port " + this.port);
|
||||
this.connecting = true;
|
||||
try {
|
||||
this.socket = new Socket(this.hostname, this.port);
|
||||
@@ -57,12 +53,8 @@ public class Client implements Runnable {
|
||||
this.receiveThread = new Thread(() -> receive(in));
|
||||
} catch (IOException e) {
|
||||
this.connecting = false;
|
||||
System.out.println("[CLIENT] there was an error connecting : " + e.getMessage());
|
||||
StringBuilder sb = new StringBuilder(" Stacktrace : ");
|
||||
Arrays.stream(e.getStackTrace()).forEach(n -> sb.append("\t\t").append(n).append("\n"));
|
||||
System.out.println(sb.toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("[CLIENT CONNECT] connected");
|
||||
}
|
||||
|
||||
public void register(ObjectInputStream in) {
|
||||
@@ -93,7 +85,6 @@ public class Client implements Runnable {
|
||||
*/
|
||||
public void writeData(Data data) {
|
||||
try {
|
||||
System.out.println("[CLIENT] writing data " + data);
|
||||
this.outputStream.writeObject(data);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -13,7 +13,6 @@ import netwerkprog.game.util.data.character.DamageData;
|
||||
import netwerkprog.game.util.data.character.MoveData;
|
||||
import netwerkprog.game.util.data.connection.TeamData;
|
||||
import netwerkprog.game.util.game.Faction;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -118,12 +117,10 @@ public class GameInputProcessor implements InputProcessor {
|
||||
}
|
||||
} else if (mainGame.getGamestate() == GAMESTATE.SELECTING_FACTION) {
|
||||
if (keycode == Input.Keys.NUM_1) {
|
||||
System.out.println("choosing mega");
|
||||
mainGame.send(new TeamData(Faction.MEGACORPORATION, mainGame.getUsername()));
|
||||
mainGame.chooseMegaCorp();
|
||||
}
|
||||
if (keycode == Input.Keys.NUM_2) {
|
||||
System.out.println("choosing hacker");
|
||||
mainGame.send(new TeamData(Faction.HACKER, mainGame.getUsername()));
|
||||
mainGame.chooseHacker();
|
||||
}
|
||||
|
||||
@@ -128,23 +128,17 @@ public class MapRenderer implements Renderable {
|
||||
GameTile cur = gameTileRow[col];
|
||||
//draw each tile
|
||||
batch.draw(cur.getTextureRegion(), cur.x, cur.y);
|
||||
|
||||
if (cur.containsCharacter()) {
|
||||
//draw each character on a tile
|
||||
GameCharacter character = cur.getCharacter();
|
||||
|
||||
if (!character.isDead()) {
|
||||
batch.draw(character.getTextureRegion(), cur.x, cur.y);
|
||||
|
||||
//if he's showing an animation, draw the hitmarker.
|
||||
if (character.isShowingAnimation())
|
||||
batch.draw(hitMarker, cur.x, cur.y);
|
||||
|
||||
// if hes selected, draw the green square
|
||||
if (cur.getCharacter().equals(mainGame.getSelectedCharacter()))
|
||||
if (character.equals(mainGame.getSelectedCharacter()))
|
||||
batch.draw(square, cur.x, cur.y);
|
||||
|
||||
|
||||
} else {
|
||||
// if hes dead, draw a tombstone
|
||||
batch.draw(tombStone, cur.x, cur.y);
|
||||
|
||||
@@ -41,7 +41,6 @@ public class SessionController implements DataCallback, Runnable {
|
||||
public void listen() {
|
||||
try {
|
||||
this.serverSocket = new ServerSocket(Data.port());
|
||||
System.out.println("[SERVER] listening on port " + Data.port());
|
||||
registerClient(serverSocket.accept());
|
||||
this.serverSocket.close();
|
||||
} catch (IOException ex) {
|
||||
|
||||
@@ -69,8 +69,6 @@ public abstract class GameCharacter extends Actor implements Comparable<GameChar
|
||||
}
|
||||
|
||||
this.damageAnimation = true;
|
||||
|
||||
System.out.println("OUCH character " + name + " was damaged for " + amount + ", animation: " + this.isShowingAnimation());
|
||||
}
|
||||
|
||||
public boolean isDead() {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TextRenderer implements Disposable {
|
||||
batch.dispose();
|
||||
font.dispose();
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.out.println("error: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,6 @@ public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
||||
protected void inorder(TreeNode<E> root) {
|
||||
if (root == null) return;
|
||||
inorder(root.left);
|
||||
System.out.print(root.element + " ");
|
||||
inorder(root.right);
|
||||
}
|
||||
|
||||
@@ -152,7 +151,6 @@ public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
||||
if (root == null) return;
|
||||
postorder(root.left);
|
||||
postorder(root.right);
|
||||
System.out.print(root.element + " ");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,7 +166,6 @@ public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
||||
*/
|
||||
protected void preorder(TreeNode<E> root) {
|
||||
if (root == null) return;
|
||||
System.out.print(root.element + " ");
|
||||
preorder(root.left);
|
||||
preorder(root.right);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ public class RestartSessionControllerTest {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println(sessionThread.getState());
|
||||
sessionThread = new Thread(sessionController);
|
||||
sessionThread.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user