Package br.com.ema.maze.components

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


      for (int x = 0; x < line.length(); x++) {
        char symbol = line.charAt(x);
        MazeSpace space = createSpace(symbol, x, y);
        maze.addSpace( space );
        if (symbol == 'E'){
          mazeConfiguration.setExitCoordinates(new Coordinates(x, y));
        }else if (symbol == 'S'){
          mazeConfiguration.setStartCoordinates(new Coordinates(x, y));
        }
      }
     
    }
  }
View Full Code Here


  @Test
  public void test_Build_Maze_With_Correct_Quantity(){
    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++) {
View Full Code Here

  @Test
  public void test_Build_Maze_With_Every_Space_Has_The_Correct_Nearby_Spaces(){
    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);
View Full Code Here

  @Test
  public void test_Build_Maze_With_Correct_Walls_Percentage(){
    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++) {
View Full Code Here

TOP

Related Classes of br.com.ema.maze.components.Coordinates

Copyright © 2018 www.massapicom. 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.