src/model/map/Lighting.java
private static boolean isObstructed(World w, int startX, int startY, int endX, int endY) {
        // dirty hack
        class BooleanValue {
            public boolean value = true;
        }
        BooleanValue obstructed = new BooleanValue();
        w.computeLine(startX, startY, endX, endY, cell -> {
            obstructed.value = !(cell.x == endX && cell.y == endY);
            return !cell.type.obstructsView;
        });
        return obstructed.value;
    }
/**
     * Used to determine if there is a line of sight between two points in the world.
     */
Used to determine if there is a line of sight between two points in the world.
Used to determine if there is a line of sight between two points in the world .
private static boolean isObstructed(World w, int startX, int startY, int endX, int endY) {
        class BooleanValue {
            public boolean value = true;
        }
        BooleanValue obstructed = new BooleanValue();
        w.computeLine(startX, startY, endX, endY, cell -> {
            obstructed.value = !(cell.x == endX && cell.y == endY);
            return !cell.type.obstructsView;
        });
        return obstructed.value;
    }
private static boolean isObstructed ( World w , int startX , int startY , int endX , int endY ) { class BooleanValue { public boolean value = true ; } BooleanValue obstructed = new BooleanValue ( ) ; w . computeLine ( startX , startY , endX , endY , cell -> { obstructed . value = ! ( cell . x == endX && cell . y == endY ) ; return ! cell . type . obstructsView ; } ) ; return obstructed . value ; }
Used to determine if there is a line of sight between two points in the world.
Used to determine if there is a line of sight between two points in the world .
// dirty hack