Examples of Recti


Examples of com.puzzlebazar.shared.util.Recti

   *
   * @param room The {@link HeyawakeRoom} to add to the puzzle.
   * @return {@code true} if the room can be added, {@code false} otherwise.
   */
  public boolean canAddRoom(HeyawakeRoom room) {
    Recti rect = room.getRoomRect();
    for (HeyawakeRoom actualRoom : rooms) {
      if (actualRoom.getRoomRect().cellsOverlap(rect)) {
        return false;
      }
    }
View Full Code Here

Examples of com.puzzlebazar.shared.util.Recti

    int[][] result = new int[getWidth()][getHeight()];
    for (int x = 0; x < getWidth(); ++x) {
      Arrays.fill(result[x], 0);
    }
    for (HeyawakeRoom room : rooms) {
      Recti rect = room.getRoomRect();
      for (int x = rect.x; x < rect.x + rect.w; ++x) {
        for (int y = rect.y; y < rect.y + rect.h; ++y) {
          result[x][y]++;
        }
      }
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.