mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
renamet packeges
This commit is contained in:
parent
ae1f29cb34
commit
448440a28d
@ -2,7 +2,7 @@ package inf112.fiasko.roborally;
|
|||||||
|
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mail class which runs the game
|
* The mail class which runs the game
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.networking;
|
package inf112.fiasko.roborally.networking;
|
||||||
|
|
||||||
import com.esotericsoftware.kryonet.Client;
|
import com.esotericsoftware.kryonet.Client;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyUI;
|
import inf112.fiasko.roborally.ui.RoboRallyUI;
|
||||||
import inf112.fiasko.roborally.utility.NetworkUtil;
|
import inf112.fiasko.roborally.utility.NetworkUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -2,8 +2,6 @@ package inf112.fiasko.roborally.networking;
|
|||||||
|
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import com.esotericsoftware.kryonet.Listener;
|
import com.esotericsoftware.kryonet.Listener;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyUI;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
||||||
@ -12,6 +10,8 @@ import inf112.fiasko.roborally.networking.containers.OkayResponse;
|
|||||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||||
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyUI;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -93,7 +93,7 @@ class RoboRallyClientListener extends Listener {
|
|||||||
*/
|
*/
|
||||||
private void receiveGameStartInfo(GameStartInfoResponse info) {
|
private void receiveGameStartInfo(GameStartInfoResponse info) {
|
||||||
wrapper.setGame(new RoboRallyGame(info.getPlayerList(), info.getBoardName(), info.getPlayerName(),
|
wrapper.setGame(new RoboRallyGame(info.getPlayerList(), info.getBoardName(), info.getPlayerName(),
|
||||||
wrapper.getServer(),wrapper.isTesting()));
|
wrapper.getServer(), wrapper.isTesting()));
|
||||||
new Thread(() -> wrapper.getGame().runTurn()).start();
|
new Thread(() -> wrapper.getGame().runTurn()).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package inf112.fiasko.roborally.networking;
|
|||||||
|
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import com.esotericsoftware.kryonet.Server;
|
import com.esotericsoftware.kryonet.Server;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import inf112.fiasko.roborally.utility.NetworkUtil;
|
import inf112.fiasko.roborally.utility.NetworkUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -3,7 +3,6 @@ package inf112.fiasko.roborally.networking;
|
|||||||
|
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import com.esotericsoftware.kryonet.Listener;
|
import com.esotericsoftware.kryonet.Listener;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.HurryResponse;
|
import inf112.fiasko.roborally.networking.containers.HurryResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.OkayResponse;
|
import inf112.fiasko.roborally.networking.containers.OkayResponse;
|
||||||
@ -12,6 +11,7 @@ import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
|||||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.UsernameRequest;
|
import inf112.fiasko.roborally.networking.containers.UsernameRequest;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.ParticleType;
|
import inf112.fiasko.roborally.objects.properties.ParticleType;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
import inf112.fiasko.roborally.utility.GridUtil;
|
import inf112.fiasko.roborally.utility.GridUtil;
|
||||||
import inf112.fiasko.roborally.utility.LaserHelper;
|
import inf112.fiasko.roborally.utility.LaserHelper;
|
||||||
|
|
||||||
@ -865,8 +865,8 @@ public class Board {
|
|||||||
case WALL_LASER_TRIPLE:
|
case WALL_LASER_TRIPLE:
|
||||||
laserDamage = 3;
|
laserDamage = 3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Invalid laser type encountered.");
|
throw new IllegalArgumentException("Invalid laser type encountered.");
|
||||||
}
|
}
|
||||||
robot.setDamageTaken(robot.getDamageTaken() + laserDamage);
|
robot.setDamageTaken(robot.getDamageTaken() + laserDamage);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an element on the board
|
* Represents an element on the board
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a board element and its position
|
* This class represents a board element and its position
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.ParticleType;
|
import inf112.fiasko.roborally.objects.properties.ParticleType;
|
||||||
import inf112.fiasko.roborally.utility.StringUtil;
|
import inf112.fiasko.roborally.utility.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a programming card
|
* This class represents a programming card
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
|
||||||
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
||||||
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import inf112.fiasko.roborally.utility.BoardLoaderUtil;
|
import inf112.fiasko.roborally.utility.BoardLoaderUtil;
|
||||||
import inf112.fiasko.roborally.utility.DeckLoaderUtil;
|
import inf112.fiasko.roborally.utility.DeckLoaderUtil;
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
|||||||
* @param server The server if this player is host. Should be null otherwise
|
* @param server The server if this player is host. Should be null otherwise
|
||||||
*/
|
*/
|
||||||
public RoboRallyGame(List<Player> playerList, String boardName, String playerName,
|
public RoboRallyGame(List<Player> playerList, String boardName, String playerName,
|
||||||
RoboRallyServer server,Boolean testingMode) {
|
RoboRallyServer server, Boolean testingMode) {
|
||||||
this.testingMode=testingMode;
|
this.testingMode = testingMode;
|
||||||
this.playerName = playerName;
|
this.playerName = playerName;
|
||||||
this.host = server != null;
|
this.host = server != null;
|
||||||
this.playerList = playerList;
|
this.playerList = playerList;
|
||||||
@ -246,10 +246,9 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
|||||||
TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER);
|
TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER);
|
||||||
|
|
||||||
if (host) {
|
if (host) {
|
||||||
if(testingMode){
|
if (testingMode) {
|
||||||
mainDeck = DeckLoaderUtil.loadProgrammingCardsTestDeck();
|
mainDeck = DeckLoaderUtil.loadProgrammingCardsTestDeck();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck();
|
mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a robot
|
* This class represents a robot
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import inf112.fiasko.roborally.utility.StringUtil;
|
import inf112.fiasko.roborally.utility.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a wall
|
* This class represents a wall
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents an action on a programming card
|
* This enum represents an action on a programming card
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents all possible directions for an element on the board
|
* This enum represents all possible directions for an element on the board
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents the different states the game can be in
|
* This enum represents the different states the game can be in
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents all possible particle types
|
* This enum represents all possible particle types
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represent a position on the board
|
* This class represent a position on the board
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents an id for marking specific robots
|
* This class represents an id for marking specific robots
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents all possible tile types
|
* This enum represents all possible tile types
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents all possible wall types
|
* This enum represents all possible wall types
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper;
|
package inf112.fiasko.roborally.ui;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
||||||
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper;
|
package inf112.fiasko.roborally.ui;
|
||||||
|
|
||||||
import com.badlogic.gdx.Game;
|
import com.badlogic.gdx.Game;
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
@ -74,7 +74,7 @@ public class RoboRallyWrapper extends Game implements RoboRallyUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTesting(){
|
public boolean isTesting() {
|
||||||
return this.isTesting;
|
return this.isTesting;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,14 +1,14 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper;
|
package inf112.fiasko.roborally.ui;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.BoardActiveScreen;
|
import inf112.fiasko.roborally.ui.screens.BoardActiveScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.CardChoiceScreen;
|
import inf112.fiasko.roborally.ui.screens.CardChoiceScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.IPAddressScreen;
|
import inf112.fiasko.roborally.ui.screens.IPAddressScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.LoadingScreen;
|
import inf112.fiasko.roborally.ui.screens.LoadingScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.LobbyScreen;
|
import inf112.fiasko.roborally.ui.screens.LobbyScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.PowerDownScreen;
|
import inf112.fiasko.roborally.ui.screens.PowerDownScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.StartMenuScreen;
|
import inf112.fiasko.roborally.ui.screens.StartMenuScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.UsernameScreen;
|
import inf112.fiasko.roborally.ui.screens.UsernameScreen;
|
||||||
import inf112.fiasko.roborally.gamewrapper.screens.WinnerScreen;
|
import inf112.fiasko.roborally.ui.screens.WinnerScreen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keeps track of screen instances
|
* Keeps track of screen instances
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper;
|
package inf112.fiasko.roborally.ui;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.InputMultiplexer;
|
import com.badlogic.gdx.InputMultiplexer;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
@ -7,17 +7,17 @@ import com.badlogic.gdx.math.Vector2;
|
|||||||
import com.badlogic.gdx.math.Vector3;
|
import com.badlogic.gdx.math.Vector3;
|
||||||
import com.badlogic.gdx.utils.Disposable;
|
import com.badlogic.gdx.utils.Disposable;
|
||||||
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.objects.DrawableGame;
|
import inf112.fiasko.roborally.objects.DrawableGame;
|
||||||
import inf112.fiasko.roborally.objects.DrawableObject;
|
import inf112.fiasko.roborally.objects.DrawableObject;
|
||||||
import inf112.fiasko.roborally.objects.InteractableGame;
|
import inf112.fiasko.roborally.objects.InteractableGame;
|
||||||
import inf112.fiasko.roborally.objects.Player;
|
import inf112.fiasko.roborally.objects.Player;
|
||||||
import inf112.fiasko.roborally.objects.Robot;
|
import inf112.fiasko.roborally.objects.Robot;
|
||||||
import inf112.fiasko.roborally.objects.Tile;
|
import inf112.fiasko.roborally.objects.Tile;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
import inf112.fiasko.roborally.utility.IOUtil;
|
import inf112.fiasko.roborally.utility.IOUtil;
|
||||||
import inf112.fiasko.roborally.utility.TextureConverterUtil;
|
import inf112.fiasko.roborally.utility.TextureConverterUtil;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
@ -12,12 +12,12 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
import inf112.fiasko.roborally.ui.SimpleButton;
|
||||||
import inf112.fiasko.roborally.utility.TextureConverterUtil;
|
import inf112.fiasko.roborally.utility.TextureConverterUtil;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
@ -8,8 +8,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.networking.RoboRallyClient;
|
import inf112.fiasko.roborally.networking.RoboRallyClient;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.InputProcessor;
|
import com.badlogic.gdx.InputProcessor;
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.graphics.GL20;
|
import com.badlogic.gdx.graphics.GL20;
|
||||||
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
@ -10,10 +10,10 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
||||||
import inf112.fiasko.roborally.objects.Player;
|
import inf112.fiasko.roborally.objects.Player;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
import inf112.fiasko.roborally.ui.SimpleButton;
|
||||||
import inf112.fiasko.roborally.utility.IOUtil;
|
import inf112.fiasko.roborally.utility.IOUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -65,7 +65,8 @@ public class LobbyScreen extends InteractiveScreen {
|
|||||||
Gdx.input.setInputProcessor(stage);
|
Gdx.input.setInputProcessor(stage);
|
||||||
stage.setViewport(viewport);
|
stage.setViewport(viewport);
|
||||||
}
|
}
|
||||||
private void startGame(){
|
|
||||||
|
private void startGame() {
|
||||||
roboRallyWrapper.server.startGame();
|
roboRallyWrapper.server.startGame();
|
||||||
Map<Connection, String> playerNames = roboRallyWrapper.server.getPlayerNames();
|
Map<Connection, String> playerNames = roboRallyWrapper.server.getPlayerNames();
|
||||||
List<Player> playerList = IOUtil.playerGenerator(playerNames,
|
List<Player> playerList = IOUtil.playerGenerator(playerNames,
|
||||||
@ -76,6 +77,7 @@ public class LobbyScreen extends InteractiveScreen {
|
|||||||
}
|
}
|
||||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper));
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
super.show();
|
super.show();
|
||||||
@ -93,9 +95,8 @@ public class LobbyScreen extends InteractiveScreen {
|
|||||||
selectBox.setSelected(testBoard);
|
selectBox.setSelected(testBoard);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (keyCode == Input.Keys.T) {
|
||||||
else if(keyCode == Input.Keys.T){
|
roboRallyWrapper.isTesting = true;
|
||||||
roboRallyWrapper.isTesting=true;
|
|
||||||
String testBoard = "Manuall_testing";
|
String testBoard = "Manuall_testing";
|
||||||
selectBox.getItems().add(testBoard);
|
selectBox.getItems().add(testBoard);
|
||||||
selectBox.setSelected(testBoard);
|
selectBox.setSelected(testBoard);
|
@ -1,12 +1,12 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
import inf112.fiasko.roborally.ui.SimpleButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This screen is used for asking players whether they want to power down
|
* This screen is used for asking players whether they want to power down
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
@ -7,10 +7,10 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
|
||||||
import inf112.fiasko.roborally.networking.RoboRallyClient;
|
import inf112.fiasko.roborally.networking.RoboRallyClient;
|
||||||
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
import inf112.fiasko.roborally.ui.SimpleButton;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
@ -7,9 +7,9 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
|
||||||
import inf112.fiasko.roborally.networking.RequestState;
|
import inf112.fiasko.roborally.networking.RequestState;
|
||||||
import inf112.fiasko.roborally.networking.containers.UsernameRequest;
|
import inf112.fiasko.roborally.networking.containers.UsernameRequest;
|
||||||
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
@ -1,12 +1,12 @@
|
|||||||
package inf112.fiasko.roborally.gamewrapper.screens;
|
package inf112.fiasko.roborally.ui.screens;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
import inf112.fiasko.roborally.ui.RoboRallyWrapper;
|
||||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
import inf112.fiasko.roborally.ui.SimpleButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This screen shows which player won the game
|
* This screen shows which player won the game
|
@ -1,8 +1,5 @@
|
|||||||
package inf112.fiasko.roborally.utility;
|
package inf112.fiasko.roborally.utility;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
|
||||||
import inf112.fiasko.roborally.objects.Board;
|
import inf112.fiasko.roborally.objects.Board;
|
||||||
import inf112.fiasko.roborally.objects.BoardElement;
|
import inf112.fiasko.roborally.objects.BoardElement;
|
||||||
import inf112.fiasko.roborally.objects.BoardElementContainer;
|
import inf112.fiasko.roborally.objects.BoardElementContainer;
|
||||||
@ -12,6 +9,9 @@ import inf112.fiasko.roborally.objects.Robot;
|
|||||||
import inf112.fiasko.roborally.objects.Tile;
|
import inf112.fiasko.roborally.objects.Tile;
|
||||||
import inf112.fiasko.roborally.objects.TwoTuple;
|
import inf112.fiasko.roborally.objects.TwoTuple;
|
||||||
import inf112.fiasko.roborally.objects.Wall;
|
import inf112.fiasko.roborally.objects.Wall;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package inf112.fiasko.roborally.utility;
|
package inf112.fiasko.roborally.utility;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -24,10 +24,12 @@ public final class DeckLoaderUtil {
|
|||||||
public static ProgrammingCardDeck loadProgrammingCardsDeck() throws IOException {
|
public static ProgrammingCardDeck loadProgrammingCardsDeck() throws IOException {
|
||||||
return loadCards("programming_cards.txt");
|
return loadCards("programming_cards.txt");
|
||||||
}
|
}
|
||||||
public static ProgrammingCardDeck loadProgrammingCardsTestDeck()throws IOException{
|
|
||||||
|
public static ProgrammingCardDeck loadProgrammingCardsTestDeck() throws IOException {
|
||||||
return loadCards("programming_cards_manuall_testing.txt");
|
return loadCards("programming_cards_manuall_testing.txt");
|
||||||
}
|
}
|
||||||
private static ProgrammingCardDeck loadCards(String cardFile) throws IOException{
|
|
||||||
|
private static ProgrammingCardDeck loadCards(String cardFile) throws IOException {
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(
|
BufferedReader reader = new BufferedReader(new InputStreamReader(
|
||||||
ResourceUtil.getResourceAsInputStream(cardFile)));
|
ResourceUtil.getResourceAsInputStream(cardFile)));
|
||||||
int numberOfCards = Integer.parseInt(reader.readLine());
|
int numberOfCards = Integer.parseInt(reader.readLine());
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package inf112.fiasko.roborally.utility;
|
package inf112.fiasko.roborally.utility;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
|
||||||
import inf112.fiasko.roborally.objects.BoardElement;
|
import inf112.fiasko.roborally.objects.BoardElement;
|
||||||
import inf112.fiasko.roborally.objects.BoardElementContainer;
|
import inf112.fiasko.roborally.objects.BoardElementContainer;
|
||||||
import inf112.fiasko.roborally.objects.Grid;
|
import inf112.fiasko.roborally.objects.Grid;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -2,9 +2,6 @@ package inf112.fiasko.roborally.utility;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.objects.DrawableGame;
|
import inf112.fiasko.roborally.objects.DrawableGame;
|
||||||
import inf112.fiasko.roborally.objects.DrawableObject;
|
import inf112.fiasko.roborally.objects.DrawableObject;
|
||||||
import inf112.fiasko.roborally.objects.Particle;
|
import inf112.fiasko.roborally.objects.Particle;
|
||||||
@ -12,6 +9,9 @@ import inf112.fiasko.roborally.objects.Player;
|
|||||||
import inf112.fiasko.roborally.objects.Robot;
|
import inf112.fiasko.roborally.objects.Robot;
|
||||||
import inf112.fiasko.roborally.objects.Tile;
|
import inf112.fiasko.roborally.objects.Tile;
|
||||||
import inf112.fiasko.roborally.objects.Wall;
|
import inf112.fiasko.roborally.objects.Wall;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package inf112.fiasko.roborally.utility;
|
package inf112.fiasko.roborally.utility;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.ParticleType;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
|
||||||
import inf112.fiasko.roborally.objects.Particle;
|
import inf112.fiasko.roborally.objects.Particle;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.ParticleType;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helps with displaying laser beams
|
* Helps with displaying laser beams
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.utility;
|
package inf112.fiasko.roborally.utility;
|
||||||
|
|
||||||
import com.esotericsoftware.kryo.Kryo;
|
import com.esotericsoftware.kryo.Kryo;
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
import inf112.fiasko.roborally.networking.containers.HandResponse;
|
||||||
@ -16,6 +14,8 @@ import inf112.fiasko.roborally.objects.Deck;
|
|||||||
import inf112.fiasko.roborally.objects.Player;
|
import inf112.fiasko.roborally.objects.Player;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -4,16 +4,16 @@ import com.badlogic.gdx.Gdx;
|
|||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import com.badlogic.gdx.utils.Disposable;
|
import com.badlogic.gdx.utils.Disposable;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.ParticleType;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
|
||||||
import inf112.fiasko.roborally.objects.Particle;
|
import inf112.fiasko.roborally.objects.Particle;
|
||||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
import inf112.fiasko.roborally.objects.Robot;
|
import inf112.fiasko.roborally.objects.Robot;
|
||||||
import inf112.fiasko.roborally.objects.Tile;
|
import inf112.fiasko.roborally.objects.Tile;
|
||||||
import inf112.fiasko.roborally.objects.Wall;
|
import inf112.fiasko.roborally.objects.Wall;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.ParticleType;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
|
||||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.ParticleType;
|
import inf112.fiasko.roborally.objects.properties.ParticleType;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import inf112.fiasko.roborally.utility.BoardLoaderUtil;
|
import inf112.fiasko.roborally.utility.BoardLoaderUtil;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import inf112.fiasko.roborally.utility.DeckLoaderUtil;
|
import inf112.fiasko.roborally.utility.DeckLoaderUtil;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Action;
|
import inf112.fiasko.roborally.objects.properties.Action;
|
||||||
import inf112.fiasko.roborally.elementproperties.GameState;
|
import inf112.fiasko.roborally.objects.properties.GameState;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ public class RoboRallyGameTest {
|
|||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
game = new RoboRallyGame(new ArrayList<>(), "Checkmate.txt", "Player1",
|
game = new RoboRallyGame(new ArrayList<>(), "Checkmate.txt", "Player1",
|
||||||
null,false);
|
null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Position;
|
import inf112.fiasko.roborally.objects.properties.Position;
|
||||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
import inf112.fiasko.roborally.objects.properties.RobotID;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inf112.fiasko.roborally.objects;
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
import inf112.fiasko.roborally.objects.properties.WallType;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package inf112.fiasko.roborally.elementproperties;
|
package inf112.fiasko.roborally.objects.properties;
|
||||||
|
|
||||||
import inf112.fiasko.roborally.objects.Wall;
|
import inf112.fiasko.roborally.objects.Wall;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
@ -2,9 +2,9 @@ package inf112.fiasko.roborally.utility;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import inf112.fiasko.roborally.GdxTestRunner;
|
import inf112.fiasko.roborally.GdxTestRunner;
|
||||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
||||||
import inf112.fiasko.roborally.elementproperties.TileType;
|
|
||||||
import inf112.fiasko.roborally.objects.Tile;
|
import inf112.fiasko.roborally.objects.Tile;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.Direction;
|
||||||
|
import inf112.fiasko.roborally.objects.properties.TileType;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user