public Box(World world, Snake[] snakes, IBoxHeuristic heuristicFunction) { this.world = world; this.snakes = snakes; calculateGValue(); this.heuristicFunction = heuristicFunction; hValue = this.heuristicFunction.calc_h(this); }
public Box(World world, int[] snakesStartLocations, IBoxHeuristic heuristicFunction, ISnakeHeuristic heuristicForSnakes) { this.world = world; snakes = new Snake[snakesStartLocations.Length]; for (int i = 0; i < snakesStartLocations.Length; i++) { snakes[i] = new Snake(world, snakesStartLocations[i], heuristicForSnakes, i == 0); //TODO: do we used imprune on one snake??? } this.heuristicFunction = heuristicFunction; hValue = this.heuristicFunction.calc_h(this); calculateGValue(); }
public BoxVirtualNode(World world, int numOfSnakes, IBoxHeuristic heuristicFunction, ISnakeHeuristic heuristicForSnakes) { if (typeof(T) != typeof(BoxOD) && typeof(T) != typeof(BoxCartesian)) { throw new ArgumentException("Bad type for BoxVirtualNode"); } this.world = world; f = 0; h = Int32.MinValue; g = 0; numberOfSnakes = numOfSnakes; this.heuristicFunction = heuristicFunction; this.heuristicForSnakes = heuristicForSnakes; }
private BoxOD(World world, Snake[] snakes, IBoxHeuristic heuristicFunction, int operatorIndex) : base(world, snakes, heuristicFunction) { this.operatorIndex = operatorIndex; }
public BoxOD(World world, int[] snakesStartLocations, IBoxHeuristic heuristicFunction, ISnakeHeuristic heuristicForSnakes) : base(world, snakesStartLocations, heuristicFunction, heuristicForSnakes) { operatorIndex = 0; }
public void TestInitialize() { world = new World(7, 2, 3); heuristicForSnakes = new SnakeNoneHeuristic(); heuristicForBox = new BoxNoneHeuristic(); }
private BoxCartesian(World world, Snake[] snakes, IBoxHeuristic heuristicFunction) : base(world, snakes, heuristicFunction) { }
public BoxCartesian(World world, int[] snakesStartLocations, IBoxHeuristic heuristicFunction, ISnakeHeuristic heuristicForSnakes) : base(world, snakesStartLocations, heuristicFunction, heuristicForSnakes) { }