public class RoundConclusionEvent extends GameEvent implements java.io.Serializable
An event to report the conclusion of a round.
This event report the final state of the table
using the getCardsOnTable()
It is map keyed by player's nicks, hence it is
possible to know who played which card. Have in mind that this map will
be empty for the first player in the round and only the last player in the
turn has information on cards played by all the others.
jpleal@fc.up.pt
Constructor and Description |
---|
RoundConclusionEvent() |
RoundConclusionEvent(java.lang.String gameId,
java.util.Map<java.lang.String,java.util.List<Card>> onTable,
int roundsCompleted,
java.util.Map<java.lang.String,java.lang.Integer> points)
Instantiate an event with given data.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<Card>> |
getCardsOnTable()
Cards on table in this turn for each player.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getPoints()
Points of all players
|
int |
getRoundsCompleted()
Number of rounds completed in this game.
|
public RoundConclusionEvent()
public RoundConclusionEvent(java.lang.String gameId, java.util.Map<java.lang.String,java.util.List<Card>> onTable, int roundsCompleted, java.util.Map<java.lang.String,java.lang.Integer> points)
gameId
- of game instanceonTable
- cards played so far in this round by each player.roundsCompleted
- in this game instance.points
- of players.public java.util.Map<java.lang.String,java.util.List<Card>> getCardsOnTable()
public int getRoundsCompleted()
public java.util.Map<java.lang.String,java.lang.Integer> getPoints()