Class EDI
java.lang.Object
ubc.team09.player.EDI
- All Implemented Interfaces:
VI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the VI's recommended move.setColor(byte color) Tells the VI which color they should make decisions for; i.e., which player they should try to maximize the score for.setTimeLimit(int seconds) Imposes a time limit for each turn that the VI takes.
-
Constructor Details
-
EDI
public EDI()Creates a new instance of EDI. Before consulting this instance, you must make sure that you usesetColor(byte)andsetTimeLimit(int). E.g.,
The move result is encoded as anVI edi = new EDI(); // Set the color of the player we want EDI to make decisions on behalf // of. edi.setColor(C.WHITE); // Set the time alloted per decision. edi.setTimeLimit(10); // 10 seconds // Given a board state, have EDI recommend a move. int move = edi.consult(state);int. In order to make use of such a move, see theMoveclass which has static methods for getting details about the move.
-
-
Method Details
-
consult
-
setColor
-
setTimeLimit
Description copied from interface:VIImposes a time limit for each turn that the VI takes.- Specified by:
setTimeLimitin interfaceVI- Parameters:
seconds- The number of seconds allotted.- Returns:
- The configured VI.
-