|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.nipax.hippo.pexeso.AI cz.nipax.hippo.pexeso.AI_random
public class AI_random
Implementation of totally stupid AI.
Overturns two random pieces when onturn()
is called. It doesn't remember which pieces are valid and calls
Playground.wantturn(cz.nipax.hippo.pexeso.AI, int, int)
until true is returner two times.
Field Summary |
---|
Fields inherited from class cz.nipax.hippo.pexeso.AI |
---|
DEBUG, m_killed, m_pg, MOVESLEEP |
Constructor Summary | |
---|---|
AI_random(Playground pg)
Simple constructor - just calls super |
Method Summary | |
---|---|
java.lang.String |
getname()
Get name of AI |
void |
onturn()
Makes two random moves. |
protected void |
random_move()
Creates one valid random move. |
Methods inherited from class cz.nipax.hippo.pexeso.AI |
---|
ivalidate, kill, println, revealed, setSleep, userinput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AI_random(Playground pg)
super
Method Detail |
---|
public java.lang.String getname()
getname
in class AI
public void onturn()
onturn
in class AI
protected void random_move()
Playground.wantturn(cz.nipax.hippo.pexeso.AI, int, int)
returns true.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |