mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-06-28 04:04:42 +02:00
Omstrukturerer litt mens det fortsatt er enkelt
Forbedrer tester Bytter navn på noen metoder og variabler Bytter noen tall til relevante konstanter Stokker om på rekkefølgen i konstruksjonsmetodene til DrawableObject
This commit is contained in:
@ -27,17 +27,16 @@ public class Game implements IDrawableGame {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IDrawableObject> objectsToRender() {
|
||||
public List<IDrawableObject> getObjectsToDraw() {
|
||||
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);
|
||||
for (int i = 0; i < TILE_NUMBER; i++) {
|
||||
for (int j = 0; j < TILE_NUMBER; j++) {
|
||||
DrawableObject tile = new DrawableObject(GameTexture.TILE, i * TILE_SIZE, j * TILE_SIZE);
|
||||
list.add(tile);
|
||||
}
|
||||
}
|
||||
DrawableObject roboObj = new DrawableObject(128,128, GameTexture.ROBOT);
|
||||
list.add(roboObj);
|
||||
|
||||
DrawableObject robot = new DrawableObject(GameTexture.ROBOT, TILE_SIZE, TILE_SIZE);
|
||||
list.add(robot);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
@ -22,9 +22,9 @@ public interface IDrawableGame {
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* Gets a list of objects which are to be rendered
|
||||
* Gets a list of objects which are to be drawn
|
||||
* @return A list of drawable objects in the order they are to be drawn
|
||||
*/
|
||||
List<IDrawableObject> objectsToRender();
|
||||
List<IDrawableObject> getObjectsToDraw();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user