-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.java
37 lines (30 loc) · 880 Bytes
/
Player.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @file Player.java
* @author Kyle Burke <[email protected]>
* @date
*
* @brief A Player of Combinatorial Games.
*
*/
//package something;
public abstract class Player<G extends CombinatorialGame> {
//instance variables
//constants
//public methods
/**
* Chooses an option to move to.
*
* @param position The position to choose an option of.
* @param playerId The index of the current player. (Either CombinatorialGame.LEFT or CombinatorialGame.RIGHT.)
* @return An option of position.
*/
public abstract G getMove(G position, int playerId);
/**
* Returns a string version of this.
*
* @return A string representation of this player.
*/
public String toString() {
return "A " + G.getName() + " player.";
}
} //end of Player.java