Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
70bb682b
Commit
70bb682b
authored
Feb 01, 2018
by
Julian Zobel
🦄
Browse files
More on multi-resource support
parent
153cc3c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/resourcedistribution/analyzer/ResourceDistributionAnalyzer.java
View file @
70bb682b
...
...
@@ -2,7 +2,7 @@ package de.tudarmstadt.maki.simonstrator.api.component.resourcedistribution.anal
import
de.tudarmstadt.maki.simonstrator.api.common.UniqueID
;
import
de.tudarmstadt.maki.simonstrator.api.component.core.MonitorComponent
;
import
de.tudarmstadt.maki.simonstrator.api.component.resourcedistribution.DistributableResource
;
import
de.tudarmstadt.maki.simonstrator.api.component.resourcedistribution.DistributableResource
.RESOURCE_TYPE
;
import
de.tudarmstadt.maki.simonstrator.api.component.resourcedistribution.DistributableResourceInventory
;
/**
...
...
@@ -19,14 +19,13 @@ public interface ResourceDistributionAnalyzer extends MonitorComponent.Analyzer
* Implementors: Keep track of this value and decrease when {@link #resourceAmountChanged(UniqueID, int, int)}
* indicates a fill up of resources to find the moment when no more resources are available.
*/
void
addMaxResources
(
DistributableResource
.
RESOURCE_TYPE
resourceType
,
int
resourceAmount
);
void
addMaxResources
(
RESOURCE_TYPE
resourceType
,
double
resourceAmount
);
/**
* Must be called if a distributor is removed from the field while still holding resources, and these resources
* were added back to the global pool of distributable resources.
*/
void
restoreMaxResources
(
UniqueID
beaconID
,
DistributableResource
.
RESOURCE_TYPE
resourceType
,
double
resourceAmount
);
void
restoreMaxResources
(
UniqueID
beaconID
,
double
resourceAmount
);
/**
* Called when the amount of resources at the given beacon changes. What caused the change depends on the number
...
...
@@ -37,8 +36,7 @@ public interface ResourceDistributionAnalyzer extends MonitorComponent.Analyzer
* 0 as oldResources. The total amount of resources distributed may not exceed the maximum value indicated by
* {@link #addMaxResources(short, int)}.
*/
void
resourceAmountChanged
(
UniqueID
beaconID
,
double
oldResources
,
double
newResources
,
DistributableResource
.
RESOURCE_TYPE
resourceType
);
void
resourceAmountChanged
(
UniqueID
beaconID
,
double
oldResources
,
double
newResources
);
void
initalResources
(
UniqueID
beaconID
,
DistributableResourceInventory
resource
Inventory
);
void
initalResources
(
UniqueID
beaconID
,
DistributableResourceInventory
resource
s
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment