Record Class HumanPlayer
java.lang.Object
java.lang.Record
org.xxdc.oss.example.HumanPlayer
- All Implemented Interfaces:
Serializable,Player
Represents a human player in the game. The human player interacts with the game by providing
their next move through the console.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents an input source that can be used to read a line of text. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intChooses the next valid move on the game board.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HumanPlayer
public HumanPlayer()Creates an instance of aHumanPlayerrecord class.
-
-
Method Details
-
nextMove
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
-