BasicWorldGenerator implements WorldGenerator { public void addLakes() throws Exception { if (currentWorld == null) { throw new Exception(NO_WORLD_EXCEPTION_MESSAGE); } for (int y = 0; y < maxY; y++) { for (int x = (y > minY) ? 0 : minX; x < maxX; x++) { int random = (int)(Math.random()*100); Tile tile = currentWorld.getTile(x, y); if ((int) tile.getProperty(TileProperty.ELEVATION) < World.LAKE_ELEVATION_CUTOFF) { tile.setTileEntity(new Water(tile)); } } } } BasicWorldGenerator(); @Override void configureWorld(World world); void configureWorld(String name, int width, int height, long seed); void setExtensionSize(int minX, int minY, int maxX, int maxY); void createRivers(); void riverPoints(long seed); boolean addRiver(int x1, int y1, int x2, int y2); void addLakes(); void setBaseTileTypes(int[] tileTypes); void setTileWaterLevel(); void setElevation(); void setMoisture(); void updateMoisture(); void setBiomes(); void addBiomeEntities(); void addSecretGold(); void placeStaffHouse(); @Override World build();  }
@Test public void testAddLakes() throws Exception { BasicWorldGenerator gen = new BasicWorldGenerator(); Assert.assertTrue("Error!! Current World is Null.",gen !=null); }