Biblioteca Java - Blame information for rev 32

Subversion Repositories:
Rev:
Rev Author Line No. Line
32 mihai 1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 package elevatorcurs.model;
7  
8 import java.util.logging.Level;
9 import java.util.logging.Logger;
10  
11 /**
12  *
13  * @author Mihai Hulea mihai.hulea@aut.utcluj.ro
14  */
15 public class Simulator {
16     private Controller c;
17     private Elevator e;
18  
19     public Simulator(Controller c, Elevator e) {
20         this.c = c;
21         this.e = e;
22     }
23  
24     public void simulate(){
25         while(true){
26             e.move();
27             c.step();
28             System.out.println(e);
29  
30             try {
31                 Thread.sleep(500);
32             } catch (InterruptedException ex) {
33                 Logger.getLogger(Simulator.class.getName()).log(Level.SEVERE, null, ex);
34             }
35         }
36     }
37 }