mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-11-04 11:43:44 +01:00 
			
		
		
		
	Gjør den del nødvendige forandringer for å kunne tegne det nye brettet
Oppdaterer IDrawableObject og IDrawableGame og implementerende klasser Legger til en utility klasse for input og output Legger til manglende metoder i TextureConverterUtil Oppdaterer noen tester med nye datatyper
This commit is contained in:
		@@ -1,10 +1,6 @@
 | 
			
		||||
package inf112.fiasko.roborally.game;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.Assert.assertTrue;
 | 
			
		||||
 | 
			
		||||
import inf112.fiasko.roborally.game.Game;
 | 
			
		||||
import inf112.fiasko.roborally.game.IDrawableGame;
 | 
			
		||||
import org.junit.Before;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
 | 
			
		||||
@@ -35,9 +31,4 @@ public class GameTest {
 | 
			
		||||
    public void gameHeightIsMaximumFullHD() {
 | 
			
		||||
        assertTrue(game.getHeight() <= 1080);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    public void getObjectsToDrawReturnsNonemptyList() {
 | 
			
		||||
        assertFalse(game.getObjectsToDraw().isEmpty());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,24 @@
 | 
			
		||||
package inf112.fiasko.roborally.objects;
 | 
			
		||||
 | 
			
		||||
import inf112.fiasko.roborally.element_properties.GameTexture;
 | 
			
		||||
import com.badlogic.gdx.Gdx;
 | 
			
		||||
import com.badlogic.gdx.graphics.Texture;
 | 
			
		||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
 | 
			
		||||
import inf112.fiasko.roborally.GdxTestRunner;
 | 
			
		||||
import org.junit.Before;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.runner.RunWith;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertSame;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
 | 
			
		||||
@RunWith(GdxTestRunner.class)
 | 
			
		||||
public class DrawableObjectTest {
 | 
			
		||||
 | 
			
		||||
    public static final GameTexture TEXTURE_MIN_ARG = GameTexture.TILE;
 | 
			
		||||
    public static final GameTexture TEXTURE_MAX_ARG = GameTexture.ROBOT;
 | 
			
		||||
    private static final Texture textureSheet = new Texture(Gdx.files.internal("assets/tiles.png"));
 | 
			
		||||
    private static final Texture robotTexture = new Texture(Gdx.files.internal("assets/Robot.png"));
 | 
			
		||||
    public static final TextureRegion TEXTURE_MIN_ARG = new TextureRegion(textureSheet, 4*300, 0, 300, 300);
 | 
			
		||||
    public static final TextureRegion TEXTURE_MAX_ARG = new TextureRegion(robotTexture, 0, 0, 64, 64);
 | 
			
		||||
    public static final int X_POSITION_MIN_ARG = 5;
 | 
			
		||||
    public static final int Y_POSITION_MIN_ARG = 8;
 | 
			
		||||
    public static final int X_POSITION_MAX_ARG = 6;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user