merge avec le github + j'ai mis les trucs de l'interface dans un package gui
This commit is contained in:
46
src/Requests/Request.java
Normal file
46
src/Requests/Request.java
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user