public class NegativeHand extends BasicHand
Constructor and Description |
---|
NegativeHand(int size) |
NegativeHand(NegativeHand hand) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
CardColour |
getKnownColour(int slot)
Get the known colour of this slot, from the perspective of the player who's hand it is.
|
Integer |
getKnownValue(int slot)
Get the known value of this slot, from the perspective of the player who's hand it is.
|
CardColour[] |
getPossibleColours(int slot)
get possible colours for a given slot.
|
int[] |
getPossibleValues(int slot)
get possible values for a given slot.
|
int |
hashCode() |
boolean |
isPossible(int slot,
Card card)
check if the card is possible, based on the owner's prespective
|
void |
setKnownColour(CardColour colour,
Integer[] slots)
Sets the known colour of a slot from the perspective of the owner.
|
void |
setKnownValue(Integer value,
Integer[] slots)
Sets the known value of a slot from the perspective of the owner.
|
bindCard, getCard, getSize, hasCard, hasColour, hasValue, init, isCompletePossible, iterator, setCard, setHasCard, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public NegativeHand(NegativeHand hand)
public NegativeHand(int size)
public CardColour getKnownColour(int slot)
BasicHand
For this version of the hand class, this is worked out based on explicitly observed tell actions. It will not take into account negative information.
getKnownColour
in interface Hand
getKnownColour
in class BasicHand
slot
- the slot to querypublic Integer getKnownValue(int slot)
BasicHand
For this version of the hand class, this is worked out based on explicitly observed tell actions. It will not take into account negative information.
getKnownValue
in interface Hand
getKnownValue
in class BasicHand
slot
- the slot to querypublic void setKnownColour(CardColour colour, Integer[] slots)
BasicHand
This method is used to inform the hand about the card from the owner's perspective (tell actions).
setKnownColour
in interface Hand
setKnownColour
in class BasicHand
colour
- the colour to assign to the slotsslots
- the slots to assign the colour to.public void setKnownValue(Integer value, Integer[] slots)
BasicHand
This method is used to inform the hand about the card from the owner's perspective (tell actions).
setKnownValue
in interface Hand
setKnownValue
in class BasicHand
value
- the value to assign to the slotsslots
- the slots to assign the value to.public int[] getPossibleValues(int slot)
BasicHand
getPossibleValues
in interface Hand
getPossibleValues
in class BasicHand
slot
- the slot to checkpublic CardColour[] getPossibleColours(int slot)
BasicHand
getPossibleColours
in interface Hand
getPossibleColours
in class BasicHand
slot
- the slot to checkpublic boolean isPossible(int slot, Card card)
BasicHand
isPossible
in interface Hand
isPossible
in class BasicHand
slot
- the slot to checkcard
- the card we are consideringCopyright © 2017 FOSS Galaxy. All rights reserved.