Create a web app where you can simulate lift mechanics for a client
- To start the app run
yarn start
.
export enum Direction {
Up = 1,
Down = 0,
}
export enum State {
Moving = 1,
Idle = 0,
Stop = -1,
}
export class Lift {
id: string;
currentDirection: Direction;
currentState: State;
currentFloor: number = 0;
}
export class Floor {
id: number;
readonly working: Boolean = true;
}
export class Request {
sourceFloor: number;
directionToGo: Direction;
}
export class Scheduler {
requests: Request[] = [];
}
- A page where you input the number of floors and lifts from the user
- An interactive UI is generated, where we have visual depictons of lifts and buttons on floors
- Upon clicking a particular button on the floor, a lift goes to that floor
Milestone 1:
- Data store that contains the state of your application data
- JS Engine that is the controller for which lift goes where
- Dumb UI that responds to controller's commands
Milestone 2:
- Lift having doors open in 2.5s, then closing in another 2.5s
- Lift moving at 2s per floor
- Lift stopping at every floor where it was called
- Mobile friendly design
[x] Constrast [x] Semantics
- Floors have working - treu/false state
- Power cut case
- handling Internal Requests