mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-04-21 11:06:24 +02:00
Endrer rotasjonen til roboter til å tilpasse seg retningen til flaggene Lager metoder som lar en printe ut grids på samme format som de blir lest fra
41 lines
778 B
Java
41 lines
778 B
Java
package inf112.fiasko.roborally.objects;
|
|
|
|
import inf112.fiasko.roborally.elementproperties.Direction;
|
|
|
|
/**
|
|
* Represents an element on the board
|
|
*
|
|
* @param <K> The type of the element
|
|
*/
|
|
public interface BoardElement<K> {
|
|
|
|
/**
|
|
* Gets the type of the element
|
|
*
|
|
* @return An enum value of type K
|
|
*/
|
|
K getType();
|
|
|
|
/**
|
|
* Gets the direction of the element
|
|
*
|
|
* @return The element's direction
|
|
*/
|
|
Direction getDirection();
|
|
|
|
/**
|
|
* Changes the direction of the element
|
|
*
|
|
* @param newDirection The element's new direction
|
|
*/
|
|
void setDirection(Direction newDirection);
|
|
|
|
/**
|
|
* Makes a copy of the board element
|
|
*
|
|
* @return A copy of the element
|
|
*/
|
|
BoardElement<K> copy();
|
|
|
|
}
|