public class ClaimResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ClaimResult |
EMPTY
Result returned when the claim did not affect the game state.
|
private MessageDialog |
message
Message returned for invalid moves.
|
private ConvexObject |
result
The newly claimed or created convex object
as a result of the claim that was made.
|
Modifier | Constructor and Description |
---|---|
private |
ClaimResult()
Prevent direct instantiation.
|
private |
ClaimResult(ConvexObject obj)
Constructs a new claim result with the
given claim result.
|
private |
ClaimResult(MessageDialog msg)
Constructs a new claim result with the
given feedback message.
|
Modifier and Type | Method and Description |
---|---|
MessageDialog |
getMessage()
Gets the feedback message for this result.
|
ConvexObject |
getResult()
Gets the game state result for this claim result.
|
boolean |
hasMessage()
Checks if this result has a feedback message.
|
boolean |
hasResult()
Checks if this claim result has a game state result.
|
static ClaimResult |
of(ConvexObject obj)
Constructs a new claim result with the
given claim result.
|
static ClaimResult |
of(MessageDialog msg)
Constructs a new claim result with the
given feedback message.
|
public static final ClaimResult EMPTY
private MessageDialog message
private ConvexObject result
private ClaimResult()
private ClaimResult(MessageDialog msg)
msg
- The feedback message.private ClaimResult(ConvexObject obj)
obj
- The newly claimed or created object.public boolean hasMessage()
public MessageDialog getMessage()
null
if there is no feedback message.hasMessage()
public boolean hasResult()
public ConvexObject getResult()
public static final ClaimResult of(MessageDialog msg)
msg
- The feedback message.public static final ClaimResult of(ConvexObject obj)
obj
- The newly claimed or created object.