public class DiscreteTimeline extends Timeline
getOwnRoundsLeft()Timeline.Type| Modifier and Type | Field and Description |
|---|---|
protected int |
cRound
E.g.
|
hasDeadline, paused| Constructor and Description |
|---|
DiscreteTimeline(int totalRounds) |
| Modifier and Type | Method and Description |
|---|---|
double |
getCurrentTime() |
int |
getOwnRoundsLeft()
The number of rounds left for ourself.
|
int |
getOwnTotalRounds()
The total number of rounds for ourself.
|
int |
getRound()
Starting to count from 1, until the total amount of rounds.
|
int |
getRoundsLeft() |
double |
getTime()
Gets the time, running from t = 0 (start) to t = 1 (deadline).
|
int |
getTotalRounds()
Be careful, this is not equal to the initializing value!
|
double |
getTotalTime()
Agent.sleep(double) requires this method. |
Timeline.Type |
getType()
In a time-based protocol, time passes within a round.
|
void |
increment() |
void |
setcRound(int cRound) |
isDeadlineReached, isPausedprotected int cRound
public DiscreteTimeline(int totalRounds)
the - total number of rounds allowed on this timeline. Creates a
timeline with a deadline of totalRounds number of
rounds. If 3, the play rounds are 1,2,3 and when we are on
round 4 the deadline is reached. see also getTime()public double getTime()
TimelinegetTime in interface TimeLineInfogetTime in class Timelinepublic void increment()
public void setcRound(int cRound)
public double getTotalTime()
Agent.sleep(double) requires this method.getTotalTime in interface TimeLineInfogetTotalTime in class Timelinepublic int getRound()
public int getRoundsLeft()
public int getTotalRounds()
public int getOwnTotalRounds()
public int getOwnRoundsLeft()
public Timeline.Type getType()
TimeLineInfogetType in interface TimeLineInfogetType in class Timelinepublic double getCurrentTime()
getCurrentTime in interface TimeLineInfogetCurrentTime in class Timeline