Package cs171a2
Class GeneralPlayer<T>
java.lang.Object
cs171a2.GeneralPlayer<T>
- Type Parameters:
T
- the type of the value returned by the player's play method.
- Direct Known Subclasses:
CardPlayer
An abstract class representing a general player.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new GeneralPlayer with a default name.GeneralPlayer
(String name) Creates a new GeneralPlayer with the given name. -
Method Summary
-
Field Details
-
name
The name of the player.
-
-
Constructor Details
-
GeneralPlayer
public GeneralPlayer()Creates a new GeneralPlayer with a default name. -
GeneralPlayer
Creates a new GeneralPlayer with the given name.- Parameters:
name
- the name of the player.
-
-
Method Details
-
play
Makes a move or takes an action, depending on the implementation.- Returns:
- the result of the player's action or move.
-