improved Program
This commit is contained in:
@@ -3,9 +3,14 @@ import worms.facade.IFacade;
|
||||
import worms.model.Team;
|
||||
import worms.model.World;
|
||||
import worms.model.Worm;
|
||||
import worms.programs.BinaryExpression;
|
||||
import worms.programs.Expression;
|
||||
import worms.programs.UnaryExpression;
|
||||
import worms.util.Coordinate;
|
||||
|
||||
import java.io.Console;
|
||||
import java.util.function.BinaryOperator;
|
||||
import java.util.function.DoubleBinaryOperator;
|
||||
|
||||
public class Main {
|
||||
private static final double EPS = 1e-4;
|
||||
@@ -16,12 +21,28 @@ public class Main {
|
||||
{ false, false, false, false } };
|
||||
|
||||
public static void main(String[] args) {
|
||||
//
|
||||
// IFacade facade = new Facade();
|
||||
// World world = facade.createWorld(4.0, 4.0, passableMap);
|
||||
//
|
||||
// Worm worm = facade.createWorm(world, new double[] { 1, 1.5 }, Math.PI / 2, 0.5, "Test", null);
|
||||
// System.out.println(world.isPassable(worm.getLocationArray(), worm.getRadius()));
|
||||
|
||||
IFacade facade = new Facade();
|
||||
World world = facade.createWorld(4.0, 4.0, passableMap);
|
||||
|
||||
Worm worm = facade.createWorm(world, new double[] { 1, 1.5 }, Math.PI / 2, 0.5, "Test", null);
|
||||
System.out.println(world.isPassable(worm.getLocationArray(), worm.getRadius()));
|
||||
Expression test = new Expression() {
|
||||
@Override
|
||||
public Object execute() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static Object l = false;
|
||||
private static Object r = true;
|
||||
|
||||
public static void test(BinaryOperator test) {
|
||||
System.out.println(test.apply(l,r));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user