Package tk.dmanstrator.connectfour
Class RoundResult
- java.lang.Object
-
- tk.dmanstrator.connectfour.RoundResult
-
public class RoundResult extends java.lang.ObjectPOJO class representing the result of a round.
-
-
Constructor Summary
Constructors Constructor Description RoundResult(java.lang.String message, boolean valid)Constructor for a round result taking a message and a flag if the round was valid.RoundResult(java.lang.String playerName, java.lang.String message, boolean valid)Constructor for a round result taking a player, a message and a flag if the round was valid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessage()Returns the message for this round.java.lang.StringgetPlayerName()Returns the name of the player for this round.booleanisValid()Returns if the round was valid or not.java.lang.StringtoString()toString overload returningResult of Round: <Message>.
-
-
-
Constructor Detail
-
RoundResult
public RoundResult(java.lang.String message, boolean valid)Constructor for a round result taking a message and a flag if the round was valid.- Parameters:
message- Message for the roundvalid-trueif round was valid, elsefalse
-
RoundResult
public RoundResult(java.lang.String playerName, java.lang.String message, boolean valid)Constructor for a round result taking a player, a message and a flag if the round was valid.- Parameters:
playerName- Name of the player of the roundmessage- Message for the roundvalid-trueif round was valid, elsefalse
-
-
Method Detail
-
getPlayerName
public java.lang.String getPlayerName()
Returns the name of the player for this round.- Returns:
- Possibly null player name
-
getMessage
public java.lang.String getMessage()
Returns the message for this round.- Returns:
- Possibly null message
-
isValid
public boolean isValid()
Returns if the round was valid or not.- Returns:
trueif round was valid, elsefalse
-
toString
public java.lang.String toString()
toString overload returningResult of Round: <Message>.- Overrides:
toStringin classjava.lang.Object
-
-