cz.nipax.hippo.pexeso
Class AI_lhd
java.lang.Object
cz.nipax.hippo.pexeso.AI
cz.nipax.hippo.pexeso.AI_random
cz.nipax.hippo.pexeso.AI_forgetting
cz.nipax.hippo.pexeso.AI_lhd
public class AI_lhd
- extends AI_forgetting
Implementation of "classic" inteligence with LHD and not enhanced random.
LHD = little hell deamon. After every turn it mixes the the pieces
that AI knows so AI is going to make a lot of mistakes.
This AI is cursed because of lhd :-)
Field Summary |
(package private) int |
m_type
|
Method Summary |
java.lang.String |
getname()
Get name of AI |
protected void |
little_hell_deamon()
Randomly mixes knowlages of AI. |
void |
onturn()
Cursing the AI :-) |
void |
revealed(int x,
int y,
int ID)
Respond to revealed and cursing the AI. |
protected boolean |
switchpieces(int x,
int y,
int a,
int b)
Switches pieces in AI_forgetting.m_field . |
protected boolean |
try_turn(int x,
int y)
Just removed random moves because it is done by LHD. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_type
int m_type
AI_lhd
public AI_lhd(Playground pg,
int type)
- Just a simple constructor
getname
public java.lang.String getname()
- Get name of AI
- Overrides:
getname
in class AI_forgetting
- Returns:
- string with name
try_turn
protected boolean try_turn(int x,
int y)
- Just removed random moves because it is done by LHD.
- Overrides:
try_turn
in class AI_forgetting
- Parameters:
x
- coordinate of wanted movey
- coordinate of wanted move
onturn
public void onturn()
- Cursing the AI :-)
- Overrides:
onturn
in class AI_forgetting
revealed
public void revealed(int x,
int y,
int ID)
- Respond to revealed and cursing the AI.
- Overrides:
revealed
in class AI_forgetting
- Parameters:
x
- coordinate of revealed cardy
- coordinate of revealed cardID
- ID of revealed card
little_hell_deamon
protected void little_hell_deamon()
- Randomly mixes knowlages of AI.
switchpieces
protected boolean switchpieces(int x,
int y,
int a,
int b)
- Switches pieces in
AI_forgetting.m_field
.
- Parameters:
x
- coordinate of first piecey
- coordinate of first piecea
- coordinate of second pieceb
- coordinate of second piece
- Returns:
- true if switch was successfull