Fikser importeringer i RoboRallyGame

Fikser også manglende scope for getNewPosition
This commit is contained in:
Kristian Knarvik 2020-03-16 20:11:31 +01:00
parent b520178686
commit 7f370a9dbc
2 changed files with 6 additions and 3 deletions

View File

@ -311,7 +311,7 @@ public class Board {
* @param direction The direction to move the element * @param direction The direction to move the element
* @return The new position of the element * @return The new position of the element
*/ */
Position getNewPosition(Position oldPosition, Direction direction) { public Position getNewPosition(Position oldPosition, Direction direction) {
switch (direction) { switch (direction) {
case NORTH: case NORTH:
return new Position(oldPosition.getXCoordinate(), oldPosition.getYCoordinate() - 1); return new Position(oldPosition.getXCoordinate(), oldPosition.getYCoordinate() - 1);

View File

@ -1,7 +1,10 @@
package inf112.fiasko.roborally.objects; package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.element_properties.Action;
import inf112.fiasko.roborally.element_properties.*; import inf112.fiasko.roborally.element_properties.Direction;
import inf112.fiasko.roborally.element_properties.Position;
import inf112.fiasko.roborally.element_properties.RobotID;
import inf112.fiasko.roborally.element_properties.TileType;
import inf112.fiasko.roborally.utility.BoardLoaderUtil; import inf112.fiasko.roborally.utility.BoardLoaderUtil;
import java.io.IOException; import java.io.IOException;