voilà, le graphique est réglé, l'ascenseur va de 0 à 1 (à précision flottante près) et graphiquement - problème de queue réglée, on est plus bloqués
This commit is contained in:
@ -45,7 +45,10 @@ class ElevatorCanvas extends JPanel {
|
||||
else {
|
||||
g.setColor(Color.BLACK);
|
||||
}
|
||||
g.fillRect(0, 200 - (int) Math.floor(elevator.getHeight() * 200) - HEIGHT, WIDTH, HEIGHT);
|
||||
// g.fillRect(0, 200 - (int) Math.floor(elevator.getHeight() * 200) - HEIGHT, WIDTH, HEIGHT);
|
||||
// System.out.println("elevator height:" + elevator.getHeight());
|
||||
g.fillRect(0, 200 - HEIGHT - (int) ((200 - HEIGHT) * elevator.getHeight()), WIDTH, HEIGHT);
|
||||
|
||||
Toolkit.getDefaultToolkit().sync();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user