EpicKnarvik97 a0ba1511b3 Endrer navn på java grensesnitt og kjører automatisk reformatering av objekter og objekttester
Endrer IInteractabaleGame til InteractableGame
Endrer IDrawableGame til DrawableGame
Endrer IDeck til Deck
Endrer IGrid til Grid
Endrer Grid til ListGrid
Endrer Deck til AbstractDeck
Endrer PowerdownContainer til PowerDownContainer
Endrer GridTest til ListGridTest
Kjører IntelliJ sin automatiske reformatering for å fikse formateringsfeil
2020-04-20 13:13:04 +02:00

46 lines
1.0 KiB
Java

package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.elementproperties.Direction;
import inf112.fiasko.roborally.elementproperties.TileType;
/**
* This class represents a simple tile
*/
public class Tile {
private TileType tileType;
private Direction direction;
/**
* Instantiates a new tile
*
* @param tileType The type of the tile
* @param direction The direction of the tile
*/
public Tile(TileType tileType, Direction direction) {
if (direction.getDirectionID() % 2 == 0) {
throw new IllegalArgumentException("Invalid direction for tile submitted");
}
this.tileType = tileType;
this.direction = direction;
}
/**
* Gets the tile type of the tile
*
* @return The tile's tile type
*/
public TileType getTileType() {
return tileType;
}
/**
* Gets the direction of the tile
*
* @return The tile's direction
*/
public Direction getDirection() {
return direction;
}
}