mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-08 02:59:36 +01:00
Merge branch 'master' of https://github.com/inf112-v20/Fiasko
This commit is contained in:
commit
0772e9cda0
@ -7,7 +7,9 @@
|
|||||||
### Tobias
|
### Tobias
|
||||||
#### Kommunikasjonsleder
|
#### Kommunikasjonsleder
|
||||||
##### Har ansvar for å organisere gruppemøter og parprogrameringsmøter
|
##### Har ansvar for å organisere gruppemøter og parprogrameringsmøter
|
||||||
* Rollen innebærer å finne ut hvilke dager folk kan møte og om vi burde møte i person eller utføre møtee digitalt på discord
|
* Rollen innebærer å finne ut hvilke dager folk kan møte og om vi burde møte i person eller
|
||||||
|
utføre møte digitalt på discord
|
||||||
|
|
||||||
* Jeg får også beskjed om noen er syke slik at gruppen kan ta det i betraktning under et møte.
|
* Jeg får også beskjed om noen er syke slik at gruppen kan ta det i betraktning under et møte.
|
||||||
|
|
||||||
### Kristian
|
### Kristian
|
||||||
@ -45,7 +47,8 @@
|
|||||||
|
|
||||||
* Kan bli bedre til å ta initiativet med å begynne på oppgaver.
|
* Kan bli bedre til å ta initiativet med å begynne på oppgaver.
|
||||||
|
|
||||||
* Vi synes det var en god idea å planlegge klassestrukturene felles i et grupperom. Det gav alle en god oversikt over hva de forskjellige klassen måtte inneholde.
|
* Vi synes det var en god idea å planlegge klassestrukturene felles i et grupperom. Det gav alle en god oversikt over
|
||||||
|
hva de forskjellige klassen måtte inneholde.
|
||||||
|
|
||||||
* Vi har brukt parprogramering som har gjort at commits har blitt en del forskjøvet.
|
* Vi har brukt parprogramering som har gjort at commits har blitt en del forskjøvet.
|
||||||
|
|
||||||
@ -129,14 +132,16 @@
|
|||||||
|
|
||||||
* Legge til en metode som fjerner en robot fra brettet.
|
* Legge til en metode som fjerner en robot fra brettet.
|
||||||
|
|
||||||
* Legge til en metode som sjekker posisjonen til roboten for å se om den er gått i et hull eller om den har gått utenfor brettet.
|
* Legge til en metode som sjekker posisjonen til roboten for å se om den er gått i et hull eller om den har gått
|
||||||
|
utenfor brettet.
|
||||||
|
|
||||||
#### Brukerhistorier for krav 4
|
#### Brukerhistorier for krav 4
|
||||||
*Brukerhistorie*
|
*Brukerhistorie*
|
||||||
* Som robot må jeg kunne dytte en annen robot hvis det er lovlig å dytte roboten, for å kunne gjøre et gyldig trekk.
|
* Som robot må jeg kunne dytte en annen robot hvis det er lovlig å dytte roboten, for å kunne gjøre et gyldig trekk.
|
||||||
|
|
||||||
*Akseptansekrav*
|
*Akseptansekrav*
|
||||||
* Hvis en robot beveger seg til en posisjon hvor det er en annen robot, vil den andre roboten bli dyttet så lenge den kan bli dyttet.
|
* Hvis en robot beveger seg til en posisjon hvor det er en annen robot, vil den andre roboten bli dyttet så lenge
|
||||||
|
den kan bli dyttet.
|
||||||
|
|
||||||
* Hvis den andre roboten blir blokkert av en vegg så kan den ikke bli dyttet og ingen av robotene flytter på seg.
|
* Hvis den andre roboten blir blokkert av en vegg så kan den ikke bli dyttet og ingen av robotene flytter på seg.
|
||||||
|
|
||||||
@ -211,7 +216,9 @@
|
|||||||
|
|
||||||
*Kjøredetaljer*
|
*Kjøredetaljer*
|
||||||
* Siden vi ikke er ferdig med spillet, blir det nå i stedet kjørt en automatisk demo når main kjøres.
|
* Siden vi ikke er ferdig med spillet, blir det nå i stedet kjørt en automatisk demo når main kjøres.
|
||||||
* Demoen demonstrerer at roboter kan skyve hverandre, bli stoppet av vegger, falle i hull og dø av å gå utenfor brettet.
|
|
||||||
|
* Demoen demonstrerer at roboter kan skyve hverandre, bli stoppet av vegger, falle i hull og dø av å gå
|
||||||
|
utenfor brettet.
|
||||||
|
|
||||||
## UML
|
## UML
|
||||||
![UML](../Deliverables/Umls/UmlOblig2.png "UML Oblig 2")
|
![UML](../Deliverables/Umls/UmlOblig2.png "UML Oblig 2")
|
||||||
|
@ -6,7 +6,7 @@ vil vi gå over til en fase der målet blir å implementere ting som er gøy, me
|
|||||||
Alle regler er hentet fra 2005 utgaven av spillguiden fra Wizards of the Coast, Inc.
|
Alle regler er hentet fra 2005 utgaven av spillguiden fra Wizards of the Coast, Inc.
|
||||||
|
|
||||||
## Spillstatus
|
## Spillstatus
|
||||||
Ved kjøring av main blir det kjørt en demo, uten mulighet for bruker å bevege robot.
|
Ved kjøring av .jar filen blir det kjørt en demo, uten mulighet for bruker å bevege robot.
|
||||||
|
|
||||||
## Bygging og kompilering
|
## Bygging og kompilering
|
||||||
|
|
||||||
@ -25,6 +25,6 @@ Dette vil også kjøre alle tester i koden
|
|||||||
### Kjøreprosedyre
|
### Kjøreprosedyre
|
||||||
```shell script
|
```shell script
|
||||||
cd target
|
cd target
|
||||||
java -jar roborally-0.1-alpha-jar-with-dependencies.jar
|
java -jar roborally-0.2-alpha-jar-with-dependencies.jar
|
||||||
```
|
```
|
||||||
Den produserte .jar filen kan alternativt flyttes til en annen mappe og dobbeltklikkes for å kjøres.
|
Den produserte .jar filen kan alternativt flyttes til en annen mappe og dobbeltklikkes for å kjøres.
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>inf112.fiasko.roborally</groupId>
|
<groupId>inf112.fiasko.roborally</groupId>
|
||||||
<artifactId>roborally</artifactId>
|
<artifactId>roborally</artifactId>
|
||||||
<version>0.1-alpha</version>
|
<version>0.2-alpha</version>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package inf112.fiasko.roborally;
|
|||||||
|
|
||||||
import com.badlogic.gdx.ApplicationAdapter;
|
import com.badlogic.gdx.ApplicationAdapter;
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
|
import com.badlogic.gdx.Input;
|
||||||
|
import com.badlogic.gdx.InputProcessor;
|
||||||
import com.badlogic.gdx.graphics.GL20;
|
import com.badlogic.gdx.graphics.GL20;
|
||||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
|
import com.badlogic.gdx.math.Vector2;
|
||||||
|
import com.badlogic.gdx.math.Vector3;
|
||||||
import inf112.fiasko.roborally.game.Game;
|
import inf112.fiasko.roborally.game.Game;
|
||||||
import inf112.fiasko.roborally.game.IDrawableGame;
|
import inf112.fiasko.roborally.game.IDrawableGame;
|
||||||
import inf112.fiasko.roborally.objects.IDrawableObject;
|
import inf112.fiasko.roborally.objects.IDrawableObject;
|
||||||
@ -17,15 +21,22 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* This class renders a game using libgdx
|
* This class renders a game using libgdx
|
||||||
*/
|
*/
|
||||||
public class GameLauncher extends ApplicationAdapter {
|
public class GameLauncher extends ApplicationAdapter implements InputProcessor {
|
||||||
private OrthographicCamera camera;
|
private OrthographicCamera camera;
|
||||||
private SpriteBatch batch;
|
private SpriteBatch batch;
|
||||||
private IDrawableGame game;
|
private IDrawableGame game;
|
||||||
|
private IDrawableGame debugGame;
|
||||||
|
|
||||||
private Texture robotTexture;
|
private Texture robotTexture;
|
||||||
private Texture textureSheet;
|
private Texture textureSheet;
|
||||||
|
|
||||||
private final int tileDimensions = 64;
|
private final int tileDimensions = 64;
|
||||||
|
private float cameraZoom = 1;
|
||||||
|
private int cameraX = 0;
|
||||||
|
private int cameraY = 0;
|
||||||
|
private Vector2 lastTouch;
|
||||||
|
private final int viewPortWidth = 12 * tileDimensions;
|
||||||
|
private final int viewPortHeight = 12 * tileDimensions;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void create() {
|
public void create() {
|
||||||
@ -33,11 +44,16 @@ public class GameLauncher extends ApplicationAdapter {
|
|||||||
robotTexture = new Texture(Gdx.files.internal("assets/Robot.png"));
|
robotTexture = new Texture(Gdx.files.internal("assets/Robot.png"));
|
||||||
textureSheet = new Texture(Gdx.files.internal("assets/tiles.png"));
|
textureSheet = new Texture(Gdx.files.internal("assets/tiles.png"));
|
||||||
|
|
||||||
game = new Game();
|
debugGame = new Game(true);
|
||||||
|
game = new Game(false);
|
||||||
camera = new OrthographicCamera();
|
camera = new OrthographicCamera();
|
||||||
camera.setToOrtho(false, game.getWidth() * tileDimensions,
|
camera.setToOrtho(false, viewPortWidth, viewPortHeight);
|
||||||
game.getHeight() * tileDimensions);
|
camera.position.set(viewPortWidth/2f, viewPortHeight/2f, 0);
|
||||||
batch = new SpriteBatch();
|
batch = new SpriteBatch();
|
||||||
|
/*MyTextInputListener listener = new MyTextInputListener();
|
||||||
|
Gdx.input.getTextInput(listener, "Input name", "", "Name");*/
|
||||||
|
Gdx.input.setInputProcessor(this);
|
||||||
|
lastTouch = new Vector2();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,6 +65,10 @@ public class GameLauncher extends ApplicationAdapter {
|
|||||||
camera.update();
|
camera.update();
|
||||||
batch.setProjectionMatrix(camera.combined);
|
batch.setProjectionMatrix(camera.combined);
|
||||||
batch.begin();
|
batch.begin();
|
||||||
|
camera.translate(cameraX, cameraY);
|
||||||
|
cameraX = 0;
|
||||||
|
cameraY = 0;
|
||||||
|
camera.zoom = cameraZoom;
|
||||||
//Draws all elements the game wants to draw
|
//Draws all elements the game wants to draw
|
||||||
List<IDrawableObject> elementsToDraw = IOUtil.getDrawableObjectsFromGame(game, tileDimensions, tileDimensions);
|
List<IDrawableObject> elementsToDraw = IOUtil.getDrawableObjectsFromGame(game, tileDimensions, tileDimensions);
|
||||||
for (IDrawableObject object : elementsToDraw) {
|
for (IDrawableObject object : elementsToDraw) {
|
||||||
@ -69,4 +89,127 @@ public class GameLauncher extends ApplicationAdapter {
|
|||||||
textureSheet.dispose();
|
textureSheet.dispose();
|
||||||
batch.dispose();
|
batch.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyDown(int keycode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyUp(int keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case Input.Keys.PLUS:
|
||||||
|
if (Gdx.input.isKeyPressed(Input.Keys.CONTROL_LEFT)) {
|
||||||
|
cameraZoom -= 0.1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Input.Keys.MINUS:
|
||||||
|
if (Gdx.input.isKeyPressed(Input.Keys.CONTROL_LEFT)) {
|
||||||
|
cameraZoom += 0.1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Input.Keys.HOME:
|
||||||
|
IDrawableGame temp = game;
|
||||||
|
this.game = debugGame;
|
||||||
|
this.debugGame = temp;
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyTyped(char character) {
|
||||||
|
if (character == 'r') {
|
||||||
|
//camera.rotate(-90);
|
||||||
|
camera.rotateAround(
|
||||||
|
new Vector3(viewPortWidth/2f, viewPortHeight/2f, 0),
|
||||||
|
new Vector3(0, 0, 1), 90);
|
||||||
|
return true;
|
||||||
|
} else if (character == 'q') {
|
||||||
|
camera.up.x = 0;
|
||||||
|
camera.up.y = 1;
|
||||||
|
cameraZoom = 1;
|
||||||
|
System.out.print((game.getHeight() * tileDimensions) - viewPortHeight/2f);
|
||||||
|
camera.position.set(viewPortWidth/2f, viewPortHeight/2f, 0);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
|
||||||
|
lastTouch = new Vector2(screenX, screenY);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
|
||||||
|
lastTouch = new Vector2(screenX, screenY);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean touchDragged(int screenX, int screenY, int pointer) {
|
||||||
|
Vector2 newTouch = new Vector2(screenX, screenY);
|
||||||
|
Vector2 diff = newTouch.cpy().sub(lastTouch);
|
||||||
|
lastTouch = newTouch;
|
||||||
|
int[] positionChange = translateCoordinateAccountingForCameraRotation(diff.x, diff.y);
|
||||||
|
cameraX = positionChange[0];
|
||||||
|
cameraY = positionChange[1];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translates x and y coordinates according to the camera's direction
|
||||||
|
* @param x The x coordinate to translate
|
||||||
|
* @param y The y coordinate to translate
|
||||||
|
* @return A list containing the translated coordinates of x and y
|
||||||
|
*/
|
||||||
|
private int[] translateCoordinateAccountingForCameraRotation(float x, float y) {
|
||||||
|
int outX = 0;
|
||||||
|
int outY = 0;
|
||||||
|
int cameraUpX = Math.round(camera.up.x);
|
||||||
|
int cameraUpY = Math.round(camera.up.y);
|
||||||
|
if (cameraUpX == 0 && Math.round(camera.up.y) == 1) {
|
||||||
|
outX = (int)-x;
|
||||||
|
outY = (int)y;
|
||||||
|
} else if (cameraUpX == 0 && cameraUpY == -1) {
|
||||||
|
outX = (int)x;
|
||||||
|
outY = (int)-y;
|
||||||
|
} else if (cameraUpX == -1 && cameraUpY == 0) {
|
||||||
|
outX = (int)-y;
|
||||||
|
outY = (int)-x;
|
||||||
|
} else if (cameraUpX == 1 && cameraUpY == 0) {
|
||||||
|
outX = (int)y;
|
||||||
|
outY = (int)x;
|
||||||
|
}
|
||||||
|
return new int[]{outX, outY};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseMoved(int screenX, int screenY) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean scrolled(int amount) {
|
||||||
|
if (amount < 0 && cameraZoom > 0 || amount > 0 && cameraZoom < 2) {
|
||||||
|
cameraZoom += amount / 10.0;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*public static class MyTextInputListener implements Input.TextInputListener {
|
||||||
|
@Override
|
||||||
|
public void input (String text) {
|
||||||
|
System.out.println(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void canceled () {
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package inf112.fiasko.roborally.element_properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This enum represents an action on a programming card
|
||||||
|
*/
|
||||||
|
public enum Action {
|
||||||
|
ROTATE_RIGHT,
|
||||||
|
ROTATE_LEFT,
|
||||||
|
U_TURN,
|
||||||
|
MOVE_1,
|
||||||
|
MOVE_2,
|
||||||
|
MOVE_3,
|
||||||
|
BACK_UP
|
||||||
|
}
|
@ -26,7 +26,15 @@ public enum TileType {
|
|||||||
FLAG_4 (20),
|
FLAG_4 (20),
|
||||||
WRENCH (21),
|
WRENCH (21),
|
||||||
WRENCH_AND_HAMMER (22),
|
WRENCH_AND_HAMMER (22),
|
||||||
DEATH_TILE (23);
|
DEATH_TILE (23),
|
||||||
|
ROBOT_SPAWN_1 (24),
|
||||||
|
ROBOT_SPAWN_2 (25),
|
||||||
|
ROBOT_SPAWN_3 (26),
|
||||||
|
ROBOT_SPAWN_4 (27),
|
||||||
|
ROBOT_SPAWN_5 (28),
|
||||||
|
ROBOT_SPAWN_6 (29),
|
||||||
|
ROBOT_SPAWN_7 (30),
|
||||||
|
ROBOT_SPAWN_8 (31);
|
||||||
|
|
||||||
private final int tileTypeID;
|
private final int tileTypeID;
|
||||||
|
|
||||||
|
@ -19,11 +19,33 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public class Game implements IDrawableGame {
|
public class Game implements IDrawableGame {
|
||||||
private Board gameBoard;
|
private Board gameBoard;
|
||||||
|
|
||||||
|
public Game(boolean debug) {
|
||||||
|
if (debug) {
|
||||||
|
initializeDebugMode();
|
||||||
|
} else {
|
||||||
|
initializeGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Game() {
|
public Game() {
|
||||||
|
initializeGame();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeDebugMode() {
|
||||||
|
List<Robot> robots = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
gameBoard = BoardLoaderUtil.loadBoard("boards/all_tiles_test_board.txt", robots);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeGame() {
|
||||||
try {
|
try {
|
||||||
List<Robot> robots = new ArrayList<>();
|
List<Robot> robots = new ArrayList<>();
|
||||||
robots.add(new Robot(RobotID.ROBOT_1, new Position(1, 1)));
|
robots.add(new Robot(RobotID.ROBOT_1, new Position(1, 1)));
|
||||||
robots.add(new Robot(RobotID.ROBOT_2, new Position(1, 2)));
|
robots.add(new Robot(RobotID.ROBOT_2, new Position(1, 2)));
|
||||||
|
robots.add(new Robot(RobotID.ROBOT_3, new Position(1, 3)));
|
||||||
gameBoard = BoardLoaderUtil.loadBoard("boards/Checkmate.txt", robots);
|
gameBoard = BoardLoaderUtil.loadBoard("boards/Checkmate.txt", robots);
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package inf112.fiasko.roborally.objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This Interface describes a card without a card suit
|
||||||
|
* @param <S> The value type
|
||||||
|
* @param <T> The symbol type
|
||||||
|
*/
|
||||||
|
public interface ICardWithoutSuit<S,T> {
|
||||||
|
/**
|
||||||
|
* Gets the value of the card
|
||||||
|
* @return The card value
|
||||||
|
*/
|
||||||
|
S getValue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the symbol of the card
|
||||||
|
* @return The card symbol
|
||||||
|
*/
|
||||||
|
T getSymbol();
|
||||||
|
}
|
@ -25,6 +25,7 @@ public final class TextureConverterUtil {
|
|||||||
private static final Texture textureSheet = new Texture(Gdx.files.internal("assets/tiles.png"));
|
private static final Texture textureSheet = new Texture(Gdx.files.internal("assets/tiles.png"));
|
||||||
private static final Texture robot1Texture = new Texture(Gdx.files.internal("assets/Robot.png"));
|
private static final Texture robot1Texture = new Texture(Gdx.files.internal("assets/Robot.png"));
|
||||||
private static final Texture robot2Texture = new Texture(Gdx.files.internal("assets/Robot2.png"));
|
private static final Texture robot2Texture = new Texture(Gdx.files.internal("assets/Robot2.png"));
|
||||||
|
private static final Texture robot3Texture = new Texture(Gdx.files.internal("assets/Robot3.png"));
|
||||||
private static Map<TileType, TextureConverterContainer> tileSheetTileTextureMappings;
|
private static Map<TileType, TextureConverterContainer> tileSheetTileTextureMappings;
|
||||||
private static Map<TileType, Boolean> tileSheetTileHasRotatedTextureMappings;
|
private static Map<TileType, Boolean> tileSheetTileHasRotatedTextureMappings;
|
||||||
private static Map<WallType, TextureConverterContainer> tileSheetWallTextureMappings;
|
private static Map<WallType, TextureConverterContainer> tileSheetWallTextureMappings;
|
||||||
@ -87,6 +88,8 @@ public final class TextureConverterUtil {
|
|||||||
return new TextureRegion(robot1Texture, 0, 0, 64, 64);
|
return new TextureRegion(robot1Texture, 0, 0, 64, 64);
|
||||||
} else if (robot.getRobotId() == RobotID.ROBOT_2) {
|
} else if (robot.getRobotId() == RobotID.ROBOT_2) {
|
||||||
return new TextureRegion(robot2Texture, 0, 0, 64, 64);
|
return new TextureRegion(robot2Texture, 0, 0, 64, 64);
|
||||||
|
} else if (robot.getRobotId() == RobotID.ROBOT_3) {
|
||||||
|
return new TextureRegion(robot3Texture, 0, 0, 64, 64);
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Robot has no drawable texture.");
|
throw new IllegalArgumentException("Robot has no drawable texture.");
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 769 B |
BIN
src/main/resources/assets/Robot3.png
Normal file
BIN
src/main/resources/assets/Robot3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 750 B |
@ -1,16 +1,20 @@
|
|||||||
12 12
|
12 16
|
||||||
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 21;1
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 21;7
|
||||||
01;1 12;3 11;3 11;3 11;3 11;3 11;3 11;3 11;3 11;3 12;5 01;1
|
01;1 12;3 11;3 11;3 11;3 11;3 11;3 11;3 11;3 11;3 12;5 01;1
|
||||||
01;1 11;1 05;3 01;1 05;3 01;1 05;7 17;1 05;7 01;1 11;5 01;1
|
01;1 11;1 05;3 01;1 05;3 01;1 05;7 17;1 05;7 01;1 11;5 01;1
|
||||||
01;1 11;1 01;1 02;1 01;1 05;3 01;1 05;7 01;1 05;7 11;5 01;1
|
01;1 11;1 01;1 02;1 01;1 05;3 01;1 05;7 01;1 05;7 11;5 01;1
|
||||||
01;1 11;1 05;3 01;1 05;3 01;1 02;1 01;1 05;7 01;1 11;5 01;1
|
01;1 11;1 05;3 01;1 05;3 01;1 02;1 01;1 05;7 01;1 11;5 01;1
|
||||||
01;1 11;1 01;1 05;3 01;1 22;1 01;1 05;7 01;1 05;7 11;5 01;1
|
01;1 11;1 01;1 05;3 01;1 22;7 01;1 05;7 01;1 05;7 11;5 01;1
|
||||||
01;1 11;1 05;3 01;1 05;3 01;1 22;1 01;1 02;1 01;1 11;5 01;1
|
01;1 11;1 05;3 01;1 05;3 01;1 22;7 01;1 02;1 01;1 11;5 01;1
|
||||||
01;1 11;1 01;1 05;3 01;1 02;1 01;1 05;7 01;1 05;7 11;5 01;1
|
01;1 11;1 01;1 05;3 01;1 02;1 01;1 05;7 01;1 05;7 11;5 01;1
|
||||||
01;1 11;1 05;3 18;1 05;3 01;1 05;7 01;1 05;7 01;1 11;5 01;1
|
01;1 11;1 05;3 18;1 05;3 01;1 05;7 01;1 05;7 01;1 11;5 01;1
|
||||||
01;1 11;1 01;1 05;3 01;1 05;3 01;1 05;7 01;1 05;7 11;5 01;1
|
01;1 11;1 01;1 05;3 01;1 05;3 01;1 05;7 01;1 05;7 11;5 01;1
|
||||||
01;1 12;1 11;7 11;7 11;7 11;7 11;7 11;7 11;7 11;7 12;7 01;1
|
01;1 12;1 11;7 11;7 11;7 11;7 11;7 11;7 11;7 11;7 12;7 01;1
|
||||||
21;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
21;7 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
30;1 28;1 01;1 26;1 01;1 24;1 25;1 01;1 27;1 01;1 29;1 31;1
|
||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
0 0 1;1 0 1;1 0 0 1;1 0 1;1 0 0
|
0 0 1;1 0 1;1 0 0 1;1 0 1;1 0 0
|
||||||
0 0 0 1;5 0 1;5 1;5 0 1;5 0 0 0
|
0 0 0 1;5 0 1;5 1;5 0 1;5 0 0 0
|
||||||
1;7 0 0 0 0 0 0 0 0 0 0 1;3
|
1;7 0 0 0 0 0 0 0 0 0 0 1;3
|
||||||
@ -23,3 +27,7 @@
|
|||||||
1;7 0 0 0 0 0 0 0 0 0 0 1;3
|
1;7 0 0 0 0 0 0 0 0 0 0 1;3
|
||||||
0 0 0 1;1 0 1;1 1;1 0 1;1 0 0 0
|
0 0 0 1;1 0 1;1 1;1 0 1;1 0 0 0
|
||||||
0 0 1;5 0 1;5 0 0 1;5 0 1;5 0 0
|
0 0 1;5 0 1;5 0 0 1;5 0 1;5 0 0
|
||||||
|
0 0 1;1 0 1;1 0 0 1;1 0 1;1 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 1;7 0 1;7 0 1;7 1;7 1;7 0 1;7 0 1;7
|
||||||
|
0 0 1;5 0 1;5 0 0 1;5 0 1;5 0 0
|
8
src/main/resources/boards/SpawnBoard
Normal file
8
src/main/resources/boards/SpawnBoard
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
30;1 28;1 01;1 26;1 01;1 24;1 25;1 01;1 27;1 01;1 29;1 31;1
|
||||||
|
01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1 01;1
|
||||||
|
0 0 1;1 0 1;1 0 0 1;1 0 1;1 0 0
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
|
0 1;7 0 1;7 0 1;7 1;7 1;7 0 1;7 0 1;7
|
||||||
|
0 0 1;5 0 1;5 0 0 1;5 0 1;5 0 0
|
33
src/main/resources/boards/all_tiles_test_board.txt
Normal file
33
src/main/resources/boards/all_tiles_test_board.txt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
8 16
|
||||||
|
01;1 01;3 01;5 01;7 02;1 02;3 02;5 02;7
|
||||||
|
03;1 03;3 03;5 03;7 04;1 04;3 04;5 04;7
|
||||||
|
05;1 05;3 05;5 05;7 06;1 06;3 06;5 06;7
|
||||||
|
07;1 07;3 07;5 07;7 08;1 08;3 08;5 08;7
|
||||||
|
09;1 09;3 09;5 09;7 10;1 10;3 10;5 10;7
|
||||||
|
11;1 11;3 11;5 11;7 12;1 12;3 12;5 12;7
|
||||||
|
13;1 13;3 13;5 13;7 14;1 14;3 14;5 14;7
|
||||||
|
15;1 15;3 15;5 15;7 16;1 16;3 16;5 16;7
|
||||||
|
17;1 17;3 17;5 17;7 18;1 18;3 18;5 18;7
|
||||||
|
19;1 19;3 19;5 19;7 20;1 20;3 20;5 20;7
|
||||||
|
21;1 21;3 21;5 21;7 22;1 22;3 22;5 22;7
|
||||||
|
23;1 23;3 23;5 23;7 24;1 24;3 24;5 24;7
|
||||||
|
25;1 25;3 25;5 25;7 26;1 26;3 26;5 26;7
|
||||||
|
27;1 27;3 27;5 27;7 28;1 28;3 28;5 28;7
|
||||||
|
29;1 29;3 29;5 29;7 30;1 30;3 30;5 30;7
|
||||||
|
31;1 31;3 31;5 31;7 01;1 01;1 01;1 01;1
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
||||||
|
0 0 0 0 0 0 0 0
|
@ -21,3 +21,11 @@ FLAG_4 6 9
|
|||||||
WRENCH 6 1
|
WRENCH 6 1
|
||||||
WRENCH_AND_HAMMER 6 0
|
WRENCH_AND_HAMMER 6 0
|
||||||
DEATH_TILE 3 11
|
DEATH_TILE 3 11
|
||||||
|
ROBOT_SPAWN_1 0 15
|
||||||
|
ROBOT_SPAWN_2 1 15
|
||||||
|
ROBOT_SPAWN_3 2 15
|
||||||
|
ROBOT_SPAWN_4 3 15
|
||||||
|
ROBOT_SPAWN_5 0 16
|
||||||
|
ROBOT_SPAWN_6 1 16
|
||||||
|
ROBOT_SPAWN_7 2 16
|
||||||
|
ROBOT_SPAWN_8 3 16
|
@ -3,7 +3,8 @@ package inf112.fiasko.roborally.element_properties;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotEquals;
|
||||||
|
|
||||||
public class PositionTest {
|
public class PositionTest {
|
||||||
private Position testPosition1;
|
private Position testPosition1;
|
||||||
|
@ -89,7 +89,6 @@ public class DrawableObjectTest {
|
|||||||
assertEquals(HEIGHT_MAX_ARG, drawableObjectMaximumArguments.getHeight());
|
assertEquals(HEIGHT_MAX_ARG, drawableObjectMaximumArguments.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getRotationMinArg() {
|
public void getRotationMinArg() {
|
||||||
assertEquals(0, drawableObjectMinimumArguments.getRotation());
|
assertEquals(0, drawableObjectMinimumArguments.getRotation());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user