mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Closes #1 Fullført game så den lager ett brett med tiles + en robot
Main bruker nå GameLauncher istedet for GameBoard
This commit is contained in:
parent
6a2a02d959
commit
4439e71dc5
@ -1,5 +1,6 @@
|
|||||||
package inf112.skeleton.app;
|
package inf112.skeleton.app;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,16 +21,26 @@ public class Game implements IDrawableGame {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return 0;
|
return BOARD_WIDTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return 0;
|
return BOARD_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IDrawableObject> objectsToRender() {
|
public List<IDrawableObject> objectsToRender() {
|
||||||
return null;
|
List<IDrawableObject> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
for (int j = 0; j < 12; j++) {
|
||||||
|
DrawableObject tileObj = new DrawableObject(i * 64, j * 64, GameTexture.TILE);
|
||||||
|
list.add(tileObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DrawableObject roboObj = new DrawableObject(128,128, GameTexture.ROBOT);
|
||||||
|
list.add(roboObj);
|
||||||
|
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,6 @@ public class Main {
|
|||||||
cfg.width = 768;
|
cfg.width = 768;
|
||||||
cfg.height = 769;
|
cfg.height = 769;
|
||||||
|
|
||||||
new LwjglApplication(new GameBoard(), cfg);
|
new LwjglApplication(new GameLauncher(), cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user