-
Notifications
You must be signed in to change notification settings - Fork 0
t-ostrowski/ActionsAndPool
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Project 2 : Simulation of a Pool
==============
Names:
LEFEBVRE Alexandre
OSTROWSKI Thomas
05/11/2014
Summary :
1) Description of the application
2) Code Samples
3) Known bugs
1) Description of the application
It's an application which simulates the organization of a swimming pool.
2)
ReallyDoStep of the Fair Scheduler
public void reallyDoStep() {
if(!currentAction.isFinished()){
currentAction.doStep();
currentAction = nextAction();
}else {
listAct.remove(currentAction);
if(!isFinished()){
currentAction= nextAction();}
}
}
ReallyDoStep of the TakeResourceAction
public void reallyDoStep() {
String display;
display = "\ttrying to take resource from pool";
tmp1 = this.pool.resourcesInUse.size();
if (tryAction()) {
this.user.setResource(this.pool.provideResource());
display += this.user.getResource().getDescription();
tmp2 = this.pool.resourcesInUse.size();
display += "... succes ";
} else {
display += "... failed ";
}
System.out.println(display);
}
3) When a swimmer finishes his actions he stays and make 2 more steps before he leaves the swimming which leads
to a number of steps of 259.
About
Simulation of a swimming pool
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published