Deleted echoes from all classes

This commit is contained in:
muskenum 2016-04-24 17:58:27 +02:00 committed by Bokros Bálint
parent e041576547
commit 13a8adec82
14 changed files with 5 additions and 219 deletions

View File

@ -6,32 +6,16 @@ public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable
public Box(){
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.Box()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.Box()");
Menu.removeTab();
}
public void destroy() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.destroy()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.destroy()");
Menu.removeTab();
}
public void pick() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.pick()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.pick()");
Menu.removeTab();
}
@Override
public int weight() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
Menu.removeTab();
return this.weight;
}
}

View File

@ -5,9 +5,6 @@ import java.io.*;
public class Dungeon {
cicaprojekt.Tile buildDungeon(File input) throws IOException
{
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Dungeon.buildDungeon(" + input + ")");
Tile oneilllocation = null;
Tile jaffalocation = null;
try(BufferedReader reader = new BufferedReader(new FileReader(input)))
@ -103,9 +100,6 @@ public class Dungeon {
}
}
}
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Dungeon.buildDungeon()");
Menu.removeTab();
return oneilllocation;
}
}

View File

@ -13,7 +13,6 @@ public class Field extends cicaprojekt.Tile
public Field() {
setItemOnTile(new Box());
adjacentTile = testAdjacentTile;
setTestAdjacentTile();
}
@ -30,28 +29,14 @@ public class Field extends cicaprojekt.Tile
@Override
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.spawnStargate(Stargate stargate, Direction direction)");
if (recursionLimit++ >= 10)
this.adjacentTile.put(direction, new Wall());
adjacentTile.get(direction).spawnStargate(stargate, direction);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.spawnStargate(Stargate stargate, Direction direction)");
Menu.removeTab();
}
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onEntry()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onEntry()");
Menu.removeTab();
}
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onExit()");
Menu.removeTab();
}
}

View File

@ -10,9 +10,5 @@ public class FlowOfTime extends Timer{
public void start()
{
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "FlowOfTime.start()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "FlowOfTime.start()");
Menu.removeTab();
}
}

View File

@ -7,25 +7,13 @@ public class Game {
public void allZPMsCollected() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.allZPMsCollected()");
this.stopGame();
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.allZPMsCollected()");
Menu.removeTab();
}
public void startGame() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.startGame()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.startGame()");
Menu.removeTab();
}
public void stopGame() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.stopGame()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Game.stopGame()");
Menu.removeTab();
}
public static void main(String[] args) {}

View File

@ -4,25 +4,13 @@ public class Gap extends cicaprojekt.Tile
{
@Override
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.spawnStargate(stargate" + direction.name() + ")");
adjacentTile.get(direction).spawnStargate(stargate, direction);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.spawnStargate()");
Menu.removeTab();
}
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.onEntry()");
this.removeItemFromTile().destroy();
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.onEntry()");
Menu.removeTab();
}
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gap.onExit()");
Menu.removeTab();
}
}

View File

@ -6,41 +6,20 @@ public class Gate extends cicaprojekt.Tile
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate(" + stargate + direction + ")");
if(this.open) adjacentTile.get(direction).spawnStargate(stargate, direction);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate()");
Menu.removeTab();
}
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onEntry()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onEntry()");
Menu.removeTab();
}
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onExit()");
Menu.removeTab();
}
public boolean isOpen() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.isOpen()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.isOpen()");
Menu.removeTab();
return open;
}
public void setOpen(boolean gateState) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen(" + gateState + ")");
this.open = gateState;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen()");
Menu.removeTab();
}
}

View File

@ -8,36 +8,20 @@ public class Player extends PlayerBase{
public Player(Tile startTile, Direction startDirection){
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.Player(" + startTile + startDirection + ")");
currentTile = startTile;
facingDirection = startDirection; /* Be lehetne állítani egy defaultot is, nem tudom, mennyire kéne */
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.Player()");
Menu.removeTab();
}
public void boxLift() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.boxLift()");
boxLifted = (Box) currentTile.getAdjacentTile(facingDirection).removeItemFromTile();
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.boxLift()");
Menu.removeTab();
}
public void boxDrop() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.boxDrop()");
currentTile.getAdjacentTile(facingDirection).setItemOnTile(boxLifted);
boxLifted = null;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.boxDrop()");
Menu.removeTab();
}
public void shootStargate(Stargate stargate) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.shootStargate(stargate)");
this.currentTile.getAdjacentTile(facingDirection).spawnStargate(stargate, facingDirection);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.shootStargate()");
Menu.removeTab();
}
}

View File

@ -7,37 +7,21 @@ public class PlayerBase implements Destroyable{
public void destroy() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.destroy()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.destroy()");
Menu.removeTab();
}
public Tile getCurrentTile() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.getCurrentTile()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.getCurrentTile()");
Menu.removeTab();
return currentTile;
}
public void setCurrentTile(Tile newCurrentTile) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.setCurrentTile()");
currentTile = newCurrentTile;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.setCurrentTile()");
Menu.removeTab();
}
public void move(Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Oneill.move(" + direction.name() + ")");
this.setFacingDirection(direction);
Tile tile = this.getCurrentTile().getAdjacentTile(direction);
tile.onEntry();
setCurrentTile(tile);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Oneill.move()");
Menu.removeTab();
}
public void rotateLeft() {
@ -75,18 +59,10 @@ public class PlayerBase implements Destroyable{
}
public Direction getFacingDirection() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.getFacingDirection()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.getFacingDirection()");
Menu.removeTab();
return facingDirection;
}
public void setFacingDirection(Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.setFacingDirection(" + direction.name() + ")");
facingDirection = direction;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Player.setFacingDirection()");
Menu.removeTab();
}
}

View File

@ -10,29 +10,17 @@ public class Scale extends Field {
public Scale(Gate gate, int threshold){
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.Scale(" + gate + ")");
gateConnected = gate;
this.threshold = threshold;
itemsOnTile = new Stack<Pickable>();
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.Scale()");
Menu.removeTab();
}
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()");
gateConnected.setOpen(true);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()");
Menu.removeTab();
}
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()");
gateConnected.setOpen(false);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()");
Menu.removeTab();
}
@Override
@ -50,11 +38,7 @@ public class Scale extends Field {
}
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate(stargate," + direction.name() + ")");
adjacentTile.get(direction).spawnStargate(stargate, direction);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate()");
Menu.removeTab();
}
private void stackChanged() {

View File

@ -11,42 +11,22 @@ public class Stargate {
public static void init() {
Menu.addTab();
System.out.println(">" + "[" + ":" + "Stargate" + "]" + Menu.tabulator + "Stargate.init()");
yellowStargate.other = blueStargate;
blueStargate.other = yellowStargate;
System.out.println("<" + "[" + ":" + "Stargate" + "]" + Menu.tabulator + "Stargate.init()");
Menu.removeTab();
}
public cicaprojekt.Wall getCurrentWall() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.getCurrentWall()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.getCurrentWall()");
Menu.removeTab();
return currentWall;
}
public void setCurrentWall(cicaprojekt.Wall wall) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.setCurrentWall(" + "wall" + ")");
currentWall = wall;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.setCurrentWall(" + "wall" + ")");
Menu.removeTab();
}
public boolean isOpen() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.isOpen()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.isOpen()");
Menu.removeTab();
return isSpawned;
}
public void teleport(Direction incomingDirection) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.teleport(" + incomingDirection.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Stargate.teleport(" + incomingDirection.name() + ")");
Menu.removeTab();
}
}

View File

@ -9,8 +9,6 @@ public abstract class Tile {
public Tile(){
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.Tile()");
adjacentTile = new HashMap<Direction, Tile>();
adjacentTile.put(Direction.NORTH, Field.testField);
@ -18,23 +16,13 @@ public abstract class Tile {
adjacentTile.put(Direction.SOUTH, Field.testField);
adjacentTile.put(Direction.WEST, Field.testField);
itemOnTile = new Box();
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.Tile()");
Menu.removeTab();
}
public Tile getAdjacentTile(Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.getAdjacentTile(" + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.getAdjacentTile(" + direction.name() + ")");
Menu.removeTab();
return adjacentTile.get(direction);
}
public void setAdajacentTile(Tile newTile, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setAdjacentTile(" + "newTile, " + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setAdjacentTile(" + "newTile, " + direction.name() + ")");
Menu.removeTab();
}
public abstract void spawnStargate(Stargate stargate, Direction direction);
@ -44,20 +32,11 @@ public abstract class Tile {
public abstract void onExit();
public Pickable removeItemFromTile() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.removeItemFromTile()");
Pickable item = itemOnTile;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.removeItemFromTile()");
Menu.removeTab();
return item;
}
public void setItemOnTile(Pickable item) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setItemOnTile(" + "item" + ")");
itemOnTile = item;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setItemOnTile(" + "item" + ")");
Menu.removeTab();
}
}

View File

@ -5,36 +5,19 @@ public class Wall extends Tile {
public void spawnStargate(Stargate stargate, Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.spawnStargate(stargate," + direction.name() + ")");
if(sg == null)
sg = stargate;
else
return;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.spawnStargate()");
Menu.removeTab();
}
public void clearStargate(){
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.clearStargate()");
sg = null;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.clearStargate()");
Menu.removeTab();
}
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onEntry()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onEntry()");
Menu.removeTab();
}
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()");
Menu.removeTab();
}
}

View File

@ -2,29 +2,15 @@ package cicaprojekt;
public class ZPM implements Pickable
{
public void pick()
{
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.pick()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.pick()");
Menu.removeTab();
public void pick(){
}
@Override
public void destroy()
{
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.destroy()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.destroy()");
Menu.removeTab();
public void destroy(){
}
@Override
public int weight() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.weight()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.weight()");
Menu.removeTab();
return 0;
return 0;
}
}