Package tk.dmanstrator.connectfour
Class RoundResult
- java.lang.Object
-
- tk.dmanstrator.connectfour.RoundResult
-
public class RoundResult extends java.lang.Object
POJO 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.String
getMessage()
Returns the message for this round.java.lang.String
getPlayerName()
Returns the name of the player for this round.boolean
isValid()
Returns if the round was valid or not.java.lang.String
toString()
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
-true
if 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
-true
if 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:
true
if round was valid, elsefalse
-
toString
public java.lang.String toString()
toString overload returningResult of Round: <Message>
.- Overrides:
toString
in classjava.lang.Object
-
-