Package br.com.ema.maze.components

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


  private MazeSpace createSpace(char symbol, int x, int y){
    MazeSpace result = new MazeSpace(x, y);

    switch (symbol) {
    case 'W':
      result.setDecoration(new MazeWall());
      break;
    }
   
    return result;
  }
View Full Code Here


        int x = (int)(Math.random() * parameters.getWidth());
        space = maze.getSpace(x, y);
       
      } while ((space.getDecoration() != null && space.getDecoration() instanceof MazeWall));
     
      space.setDecoration(new MazeWall());
      wallsSetted ++;
    }
  }
View Full Code Here

    while(alive){
      try {
        Thread.sleep(getNextInterval());
        if (running){
          if (walls.size() > 0){
            MazeWall wall = walls.get(getNextWallIndex());
            wall.setAllowsPassage(!wall.allowsPassage());
          }
        }
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
View Full Code Here

TOP

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

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.