Class HMIStrategy
java.lang.Object
be.belegkarnil.game.board.tak.strategy.StrategyAdapter
be.belegkarnil.game.board.tak.strategy.HMIStrategy
- All Implemented Interfaces:
Strategy
This class is a special a
Strategy class that is recognized by the GUI. This class allow
a human player to select a Piece and a position Point in order to play an Action.- Author:
- Belegkarnil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOverride theStrategy.plays(Player, Board, Player)and return what defined by the GUI interface after callingsetAction(Action)voidDefines the next action to playvoidsetMoveAction(Point src, Point dst, int[] amount) TODOvoidDefines the next action to playvoidDefines the next action as a skip actionMethods inherited from class be.belegkarnil.game.board.tak.strategy.StrategyAdapter
register, unregister
-
Constructor Details
-
HMIStrategy
public HMIStrategy()Constructs aStrategythat interact with the GUI
-
-
Method Details
-
setSkipAction
public void setSkipAction()Defines the next action as a skip action -
setPiece
Defines the next action to play- Parameters:
piece- the piece to playposition- the position at which put the piece
-
setMoveAction
TODO -
setAction
Defines the next action to play- Parameters:
action- the action to play
-
plays
Override theStrategy.plays(Player, Board, Player)and return what defined by the GUI interface after callingsetAction(Action)- Parameters:
myself- seeStrategy.plays(be.belegkarnil.game.board.tak.Player, be.belegkarnil.game.board.tak.Board, be.belegkarnil.game.board.tak.Player)board- seeStrategy.plays(be.belegkarnil.game.board.tak.Player, be.belegkarnil.game.board.tak.Board, be.belegkarnil.game.board.tak.Player)opponent- seeStrategy.plays(be.belegkarnil.game.board.tak.Player, be.belegkarnil.game.board.tak.Board, be.belegkarnil.game.board.tak.Player)- Returns:
- The
Actiondefined by the GUI after callingsetAction(Action)
-