Examples of Door


Examples of com.nebhale.letsmakeadeal.Door

        int winner = RANDOM.nextInt(3);
        for (int i = 0; i < 3; i++) {
            Long id = this.idGenerator.getAndIncrement();
            DoorContent content = i == winner ? DoorContent.JUERGEN : DoorContent.SMALL_FURRY_ANIMAL;
            doors.add(new Door(id, content));
        }

        return doors;
    }
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.positions.Door

  ) {
    Set<Integer> rooms = new HashSet<Integer>();
   
    for(Instruction instr : instructions){
      if(instr._code == Instruction.code.ENTER_DOOR){
        Door subject = (Door)referenceMap.getPosition(instr._subjectId);
        int[] doorRooms = subject.getRoomIds();
        rooms.add(doorRooms[0]);
        rooms.add(doorRooms[1]);
      }
    }
   
View Full Code Here

Examples of games.stendhal.client.entity.Door

   */
  @Override
  protected void buildActions(final List<String> list) {
    super.buildActions(list);

    Door door = (Door) entity;
    if (door != null && door.isOpen()) {
      list.add(ActionType.CLOSE.getRepresentation());
    } else {
      list.add(ActionType.OPEN.getRepresentation());

    }
View Full Code Here

Examples of org.bukkit.material.Door

      if(g.isOpen())
        inData.setValid(true);
    }
    else if(inData.getAboveBlock().getType() == Material.WOOD_DOOR || (!this.m_ironDoor && inData.getAboveBlock().getType() == Material.IRON_DOOR_BLOCK))
    {
      Door d = (Door)inData.getAboveBlock().getState().getData();
      if(d.isOpen())
        inData.setValid(true);
    }
  }
View Full Code Here

Examples of org.bukkit.material.Door

        this.altState = null;
        this.setBlockLocation(new BlockLocation(block.getLocation()));
       
        if (update)
          if(state.getData() instanceof Door) {
              Door door = (Door)state.getData();
              Block topHalf;
              Block bottomHalf;
              if(door.isTopHalf()) {
                  topHalf = block;
                  bottomHalf = block.getRelative(BlockFace.DOWN);
              } else {
                  bottomHalf = block;
                  topHalf = block.getRelative(BlockFace.UP);
View Full Code Here

Examples of org.bukkit.material.Door

    }
   
    public void replaceProtections() {
        Block block = state.getBlock();
        if(state.getData() instanceof Door) {
            Door door = (Door)state.getData();
            Block topHalf;
            Block bottomHalf;
            if(door.isTopHalf()) {
                topHalf = block;
                bottomHalf = block.getRelative(BlockFace.DOWN);
            } else {
                bottomHalf = block;
                topHalf = block.getRelative(BlockFace.UP);
            }
            door.setTopHalf(true);
            topHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
            door.setTopHalf(false);
            bottomHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
        } else if(state instanceof Sign) {
            block.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
            Sign sign = (Sign)block.getState();
            int i = 0;
View Full Code Here

Examples of org.jbpm.examples.doorjava.Door

    } catch (IllegalStateException e) {
    }
  }

  public void testClosedUnlock() {
    Door door = new Door();
    try {
      door.unlock();
      fail("expected exception");
    } catch (IllegalStateException e) {
    }
  }
View Full Code Here

Examples of org.jbpm.examples.doorjava.Door

    } catch (IllegalStateException e) {
    }
  }

  public void testOpenedOpen() {
    Door door = new Door();
    door.state = Door.OPEN;
    try {
      door.open();
      fail("expected exception");
    } catch (IllegalStateException e) {
    }
  }
View Full Code Here

Examples of org.jbpm.examples.doorjava.Door

    } catch (IllegalStateException e) {
    }
  }

  public void testOpenedLock() {
    Door door = new Door();
    door.state = Door.OPEN;
    door.lock();
    assertSame(Door.OPEN_LOCKED, door.state);
  }
View Full Code Here

Examples of org.jbpm.examples.doorjava.Door

    door.lock();
    assertSame(Door.OPEN_LOCKED, door.state);
  }

  public void testOpenedClose() {
    Door door = new Door();
    door.state = Door.OPEN;
    door.close();
    assertSame(Door.CLOSED, door.state);
  }
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.