Fixed tests
This commit is contained in:
@@ -72,10 +72,18 @@ public class WorldTests{
|
||||
}
|
||||
}
|
||||
|
||||
private static void fillWith(short tileID){
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
for(int y = 0; y < tiles[0].length; y++){
|
||||
tiles[x][y] = new Tile(x, y, (short)0, (short)0, tileID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void addDarknessOneNotSolidMiddleNoDarkness(){
|
||||
fillWith(Blocks.rocks.id);
|
||||
tiles[5][5] = new Tile(5, 5, (byte)0, Blocks.copperWall.id, (byte)0, (byte)0);
|
||||
tiles[5][5] = new Tile(5, 5, (byte)0, (byte)0, Blocks.copperWall.id);
|
||||
world.addDarkness(tiles);
|
||||
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
@@ -90,7 +98,7 @@ public class WorldTests{
|
||||
@Test
|
||||
void addDarknessOneNotSolidCornerNoDarkness(){
|
||||
fillWith(Blocks.rocks.id);
|
||||
tiles[7][7] = new Tile(5, 5, (byte)0, Blocks.copperWall.id, (byte)0, (byte)0);
|
||||
tiles[7][7] = new Tile(5, 5, (byte)0, (byte)0, Blocks.copperWall.id);
|
||||
world.addDarkness(tiles);
|
||||
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
@@ -101,12 +109,4 @@ public class WorldTests{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void fillWith(byte tileID){
|
||||
for(int x = 0; x < tiles.length; x++){
|
||||
for(int y = 0; y < tiles[0].length; y++){
|
||||
tiles[x][y] = new Tile(x, y, (byte)0, tileID, (byte)0, (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user