public abstract class AI
extends java.lang.Object
Constructor and Description |
---|
AI() |
Modifier and Type | Method and Description |
---|---|
boolean[][] |
canGoArea(int[][] level,
int x,
int y,
AtMove eAtMove)
returns a 2 dimensional boolean array
true = the figure on position x|y can move on that field false = the figure on position x|y can't move on that field |
boolean[][] |
canGoArea(int[][] level,
int x,
int y,
int turn)
returns a 2 dimensional boolean array
true = the figure on position x|y can move on that field false = the figure on position x|y can't move on that field |
boolean[][] |
getCopy(boolean[][] level)
returns a copy of the array
|
abstract java.lang.String |
getName()
returns the name of the ai
|
int[][] |
getSafeArray(int[][] level,
AtMove eAtMove)
returns an 2 dimensional int array
is the value == 0 then the field isnt safed by another figure is the value > 0 field is safed by another figure value == 30000 safed by bishop or knight value == 90000 safed by queen value == 50000 safed by rook value == 10000 safed by pawn |
int[][] |
getSafeArray(int[][] level,
int turn)
returns an 2 dimensional int array
is the value == 0 then the field isnt safed by another figure is the value > 0 field is safed by another figure value == 30000 safed by bishop or knight value == 90000 safed by queen value == 50000 safed by rook value == 10000 safed by pawn |
java.lang.String |
getStatus()
returns a string with the current "status" of thinking for the ai
|
boolean[][] |
getWalkable()
returns a 2 dimensional boolean Array, true field is walkable, false field is not walkable
|
boolean |
isBreak() |
void |
reset()
will be called before the think method is called
|
void |
setBreak(boolean bBreak)
when the time limit is reached that method is called and bBreak is true
after that please come to an end, the game will perform the next step
|
void |
setChessBall(chessBall.ChessBall chessBall)
please dont touch that method :D
|
abstract java.util.ArrayList<ChessBallAIMove> |
think(int[][] level,
AtMove eAtMove)
the MAIN method, will be called to start the ai
|
public void setChessBall(chessBall.ChessBall chessBall)
chessBall
- public void reset()
public boolean isBreak()
public void setBreak(boolean bBreak)
bBreak
- public abstract java.lang.String getName()
public abstract java.util.ArrayList<ChessBallAIMove> think(int[][] level, AtMove eAtMove)
level
- = current leveleAtMove
- = which turnpublic java.lang.String getStatus()
public boolean[][] getWalkable()
public int[][] getSafeArray(int[][] level, AtMove eAtMove)
level
- : current leveleAtMove
- : which turnpublic int[][] getSafeArray(int[][] level, int turn)
level
- : current levelturn
- : which turn, 0 == white, 1 == blackpublic boolean[][] canGoArea(int[][] level, int x, int y, AtMove eAtMove)
level
- = current level/playgroundx
- = x positiony
- = y positioneAtMove
- = which turnpublic boolean[][] canGoArea(int[][] level, int x, int y, int turn)
level
- = current level/playgroundx
- = x positiony
- = y positionturn
- = which turn, 0 == white, 1 == blackpublic boolean[][] getCopy(boolean[][] level)
level
-