Class FiveGame.ProgrammedAgent
java.lang.Object
nl.uu.cs.aplib.exampleUsages.fiveGame.FiveGame.RandomPlayer
nl.uu.cs.aplib.exampleUsages.fiveGame.FiveGame.ProgrammedAgent
- Enclosing class:
- FiveGame
-
Field Summary
Fields inherited from class nl.uu.cs.aplib.exampleUsages.fiveGame.FiveGame.RandomPlayer
game, rnd, ty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
move()
Find a random empty place, which is adjacent to another of the same type, and put a piece there.void
programMoves(int... moves)
Methods inherited from class nl.uu.cs.aplib.exampleUsages.fiveGame.FiveGame.RandomPlayer
getNeigbors
-
Field Details
-
programmedMoves
List<FiveGame.Square_> programmedMoves
-
-
Constructor Details
-
ProgrammedAgent
-
-
Method Details
-
programMoves
public void programMoves(int... moves) -
move
public boolean move()Description copied from class:FiveGame.RandomPlayer
Find a random empty place, which is adjacent to another of the same type, and put a piece there. If there is no such square then choose a random empty square. If there is no empty square left, the method returns false.- Overrides:
move
in classFiveGame.RandomPlayer
-