Package myclasses

Examples of myclasses.THuman


  // генерация случайного человка на случайном этаже
  if (count == 0)
  {
    int f = rnd.nextInt(floorNum), d;
    do d = rnd.nextInt(floorNum); while (d == f);
    floors.get(f).add(new THuman(d));
    elev.callElevator(f);
  }
 
  // шаг лифта
  elev.step();
View Full Code Here


    return 0;
  }
  public boolean out() // возвращает лажь если никто не вышел
  {
    if (passangers.isEmpty()) return false;
    THuman tmp = null;
    for(THuman p : passangers)
      if (p.getDestination() == currentFloor)
      { tmp = p; break; }
    if (tmp!=null) { passangers.remove(tmp); return true; }
    else return false;
View Full Code Here

TOP

Related Classes of myclasses.THuman

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.