Class RandomStrategy

java.lang.Object
be.belegkarnil.game.board.tak.strategy.RandomStrategy
All Implemented Interfaces:
RoundListener, Strategy, EventListener

public class RandomStrategy extends Object implements Strategy, RoundListener
This Strategy represents a strategy that randomly plays. Pieces are randomly sorted, position are randomly sorted, rotation are randomly sorted. Then for each combination, if the move is valid (Board.canPlace(Piece, Point)) then play. Otherwise, ask to replace/swap if the bag if not empty. In other cases, return the skip action.
Author:
Belegkarnil