mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-06-28 04:04:42 +02:00
Legger til tekstur for robot 2
Legger til flere steg i game loop demoen
This commit is contained in:
@ -24,6 +24,7 @@ public class Game implements IDrawableGame {
|
||||
try {
|
||||
List<Robot> robots = new ArrayList<>();
|
||||
robots.add(new Robot(RobotID.ROBOT_1, new Position(1, 1)));
|
||||
robots.add(new Robot(RobotID.ROBOT_2, new Position(1, 2)));
|
||||
gameBoard = BoardLoaderUtil.loadBoard("boards/Checkmate.txt", robots);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
@ -57,6 +58,14 @@ public class Game implements IDrawableGame {
|
||||
gameBoard.rotateRobotRight(RobotID.ROBOT_1);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
gameBoard.moveRobot(RobotID.ROBOT_1, Direction.SOUTH);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
gameBoard.moveRobot(RobotID.ROBOT_2, Direction.EAST);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
gameBoard.moveRobot(RobotID.ROBOT_2, Direction.WEST);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
gameBoard.moveRobot(RobotID.ROBOT_2, Direction.EAST);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
gameBoard.moveRobot(RobotID.ROBOT_2, Direction.EAST);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user