Examples of Maze


Examples of br.com.ema.maze.components.Maze

  /* (non-Javadoc)
   * @see br.com.ema.maze.factory.MazeAbstractFactory#buildMaze(java.lang.Object)
   */
  @Override
  public Maze buildMaze(MazeFile mazeFile) {
    Maze maze = new Maze();
    mazeConfiguration = new MazeConfiguration();
   
    MazeCharacter character1 = new MazeCharacter(250);
    character1.setStrategy(new AStarStrategy(10000));
    character1.setColor(Color.CYAN);
View Full Code Here

Examples of br.com.ema.maze.components.Maze

 
  private MazeNearbyUpdater updater = new MazeNearbyUpdater();

  @Override
  public Maze buildMaze(MazeParameters parameters) {
    Maze maze = new Maze();
   
    createSpaces(parameters, maze);
   
    setNearbyInToSpaces(maze);
   
View Full Code Here

Examples of br.com.ema.maze.components.Maze

    int width = 10;
    int height = 5;
    int wallPercentage = 0;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );
   
    for (int y = 0; y < height; y++) {
      for (int x = 0; x < width; x++) {
        MazeSpace mazeSpace = maze.getSpace(x, y);
        assertNotNull( mazeSpace );
      }
    }
  }
View Full Code Here

Examples of br.com.ema.maze.components.Maze

    int width = 3;
    int height = 2;
    int wallPercentage = 0;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );

    MazeSpace space00 = maze.getSpace(0, 0);
    MazeSpace space01 = maze.getSpace(0, 1);
    MazeSpace space10 = maze.getSpace(1, 0);
    MazeSpace space11 = maze.getSpace(1, 1);
    MazeSpace space20 = maze.getSpace(2, 0);
    MazeSpace space21 = maze.getSpace(2, 1);
   
    /*
     * 00 | 10 | 20
     * 01 | 11 | 21
     */
 
View Full Code Here

Examples of br.com.ema.maze.components.Maze

    int width = 10;
    int height = 5;
    int wallPercentage = 25;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );
   
    int walls = 0;
    for (int y = 0; y < height; y++) {
      for (int x = 0; x < width; x++) {
        MazeSpace mazeSpace = maze.getSpace(x, y);
        if (mazeSpace.getDecoration() != null && mazeSpace.getDecoration() instanceof MazeWall){
          walls ++;
        }
      }
    }
View Full Code Here

Examples of br.com.ema.maze.components.Maze

    MazeSpace space10 = new MazeSpace(1, 0);
    MazeSpace space11 = new MazeSpace(1, 1);
    MazeSpace space20 = new MazeSpace(2, 0);
    MazeSpace space21 = new MazeSpace(2, 1);
   
    Maze maze = new Maze();
    maze.addSpace(space00);
    maze.addSpace(space01);
    maze.addSpace(space10);
    maze.addSpace(space11);
    maze.addSpace(space20);
    maze.addSpace(space21);
   
    MazeNearbyUpdater updater = new MazeNearbyUpdater();
    updater.updateNearby(maze);
   
    /*
 
View Full Code Here

Examples of br.com.ema.maze.components.Maze

  public void test_Build_Maze(){
    URL resource = getClass().getResource("maze_file_example.maze");
    File file = new File(resource.getFile());
    MazeFile mazeFile = new MazeFile(file);
   
    Maze maze = factory.buildMaze(mazeFile);
   
    assertEquals(30, maze.getWidth());
    assertEquals(24, maze.getHeight());
   
  }
View Full Code Here

Examples of info.pello.tooomb.Maze

  Maze testedMaze;
 
  @Test
  public void testNew() {
    String name = "Test Maze";
    testedMaze = new Maze(name);
    assertEquals("Test if name is assigned", testedMaze.getName(), name);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.