merge avec le github + j'ai mis les trucs de l'interface dans un package gui

This commit is contained in:
MathieuPietri
2019-10-11 17:59:39 +02:00
parent aa0b3a6bb4
commit e0280d7e18
17 changed files with 362 additions and 0 deletions

46
src/Requests/Request.java Normal file
View File

@ -0,0 +1,46 @@
package Requests;
import commandSystem.Direction;
public abstract class Request {
protected RequestType type;
protected int wantedFloor;
protected int sourceFloor;
protected Direction direction;
public Request() {
this.wantedFloor = -1;
this.sourceFloor = -1;
this.direction = Direction.NONE;
}
/**
*
* @return the direction of the request, unconcerned extending classes return NONE
*/
public Direction getDirection() {
return direction;
}
/**
*
* @return the wished floor, unconcerned extending classes return -1
*/
public int getWantedFloor() {
return wantedFloor;
}
/**
*
* @return the floor it was called from, unconcerned extending classes return -1
*/
public int getIncomingCallFloor() {
return sourceFloor;
}
public RequestType getType() {
return type;
}
}