-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
070fad9
commit ad9b759
Showing
6 changed files
with
128 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package utils; | ||
|
||
import game.Game; | ||
import util.AI; | ||
import util.Context; | ||
import util.Move; | ||
|
||
/** | ||
* AI player doing nothing. | ||
* | ||
* @author Eric.Piette | ||
*/ | ||
public class BaseAI extends AI | ||
{ | ||
|
||
//------------------------------------------------------------------------- | ||
|
||
/** Our player index */ | ||
protected int player = -1; | ||
|
||
/** The last move we returned */ | ||
protected Move lastReturnedMove = null; | ||
|
||
//------------------------------------------------------------------------- | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public BaseAI() | ||
{ | ||
friendlyName = "Base"; | ||
} | ||
|
||
//------------------------------------------------------------------------- | ||
|
||
@Override | ||
public Move selectAction | ||
( | ||
final Game game, | ||
final Context context, | ||
final double maxSeconds, | ||
final int maxIterations, | ||
final int maxDepth | ||
) | ||
{ | ||
return null; | ||
} | ||
|
||
/** | ||
* @return The last move we returned | ||
*/ | ||
public Move lastReturnedMove() | ||
{ | ||
return lastReturnedMove; | ||
} | ||
|
||
@Override | ||
public void initAI(final Game game, final int playerID) | ||
{ | ||
this.player = playerID; | ||
lastReturnedMove = null; | ||
} | ||
|
||
//------------------------------------------------------------------------- | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters