Package cz.cuni.mff.abacs.burglar.logics.objects

Examples of cz.cuni.mff.abacs.burglar.logics.objects.Room


     
      Position position = this.getPosition(instr._subjectId);
     
      if(position.isTypeOf(BaseInterface.Type.DOOR)){
        Door door = (Door)position;
        Room rooms[] = door.getRooms();
       
        if(trapRooms.contains(rooms[0]) &&
           triggeredRooms.contains(rooms[0]) == false)
          triggeredRooms.add(rooms[0]);
        if(trapRooms.contains(rooms[1]) &&
           triggeredRooms.contains(rooms[1]) == false)
          triggeredRooms.add(rooms[1]);
      }else{
        Room room = position.getRoom();
        if(trapRooms.contains(room) &&
           triggeredRooms.contains(room) == false)
          triggeredRooms.add(room);
      }
    }
View Full Code Here


      Node node = rawList.item(i);
      if(
        node.getNodeType() == Node.ELEMENT_NODE &&
        node.getNodeName().equals(STR_ROOM)
      ){
        Room room = XMLLoader.getRoom((Element)node, map);
        ret.add(room);
      }
    }

    return ret;
View Full Code Here

    }catch(NumberFormatException e){
      id = map.getNextID();
    }
   
    // create the Room object
    Room room = new Room(id, x, y, height, width, map);
    room.setIsLit(isLit);
    return room;
  }
View Full Code Here

    int id = XMLBase.getIntAttrOrZero(cameraElement, STR_ID);
    int x  = XMLBase.getIntAttrOrZero(cameraElement, STR_X);
    int y  = XMLBase.getIntAttrOrZero(cameraElement, STR_Y);
    boolean isActive =
      XMLBase.getBooleanAttrOrFalse(cameraElement, STR_IS_ACTIVE);
    Room room;
    try{
      int roomId =
        Integer.parseInt(cameraElement.getAttribute(STR_ROOM));
      room = map.getRoom(roomId);
    }catch(NumberFormatException e){
View Full Code Here

      XMLBase.getBooleanAttrOrFalse(containerElement, STR_IS_LOCKED);
    boolean isClosed =
      XMLBase.getBooleanAttrOrTrue(containerElement, STR_IS_CLOSED);
   
    // create the object
    Room room = map.getRoom(roomId);
    Container container;
    if(keyId == 0) {
      container = new Container(id, x, y, room, isClosed, map);
    }else{
      container = new Container(id, x, y, room, isClosed, isLocked, keyId, map);
View Full Code Here

      XMLBase.getBooleanAttrOrFalse(doorElement, STR_IS_LOCKED);
    boolean isClosed =
      XMLBase.getBooleanAttrOrTrue(doorElement, STR_IS_CLOSED);
   
    // create the object
    Room from = map.getRoom(fromRoom);
    Room to = map.getRoom(toRoom);
//    if(keyId == 0){
//      return new Door(id, x, y, from, to, isClosed, map);
//    }else{
      return new Door(id, x, y, from, to, isClosed, isLocked, keyId, map);
//    }
View Full Code Here

  private static Position getFloor(Element floorElement, DataMap map) {
    // get the attributes:
    int id = XMLBase.getIntAttrOrZero(floorElement, STR_ID);
    int x  = XMLBase.getIntAttrOrZero(floorElement, STR_X);
    int y  = XMLBase.getIntAttrOrZero(floorElement, STR_Y);
    Room room;
    try{
      int roomId =
        Integer.parseInt(floorElement.getAttribute(STR_ROOM));
      room = map.getRoom(roomId);
    }catch(NumberFormatException e){
View Full Code Here

    int id = XMLBase.getIntAttrOrZero(phoneElement, STR_ID);
    int x  = XMLBase.getIntAttrOrZero(phoneElement, STR_X);
    int y  = XMLBase.getIntAttrOrZero(phoneElement, STR_Y);
    Boolean isRinging =
      XMLBase.getBooleanAttrOrFalse(phoneElement, STR_IS_RINGING);
    Room room;
    try{
      int roomId = Integer.parseInt(phoneElement.getAttribute(STR_ROOM));
      room = map.getRoom(roomId);
    }catch(NumberFormatException e){
      room = null;
View Full Code Here

    // get the attributes:
    int id = XMLBase.getIntAttrOrZero(switchElement, STR_ID);
    int x  = XMLBase.getIntAttrOrZero(switchElement, STR_X);
    int y  = XMLBase.getIntAttrOrZero(switchElement, STR_Y);
    int targetId = XMLBase.getIntAttrOrZero(switchElement, STR_TARGET);
    Room room;
    try{
      int roomId = Integer.parseInt(switchElement.getAttribute(STR_ROOM));
      room = map.getRoom(roomId);
    }catch(NumberFormatException e){
      room = null;
View Full Code Here

    int id = XMLBase.getIntAttrOrZero(venderElement, STR_ID);
    int x  = XMLBase.getIntAttrOrZero(venderElement, STR_X);
    int y  = XMLBase.getIntAttrOrZero(venderElement, STR_Y);
    boolean  hasDropped =
      XMLBase.getBooleanAttrOrFalse(venderElement, STR_HAS_DROPPED);
    Room room;
    try{
      int roomId = Integer.parseInt(venderElement.getAttribute(STR_ROOM));
      room = map.getRoom(roomId);
    }catch(NumberFormatException e){
      room = null;
View Full Code Here

TOP

Related Classes of cz.cuni.mff.abacs.burglar.logics.objects.Room

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.