Class Random
java.lang.Object
org.xxdc.oss.example.bot.Random
- All Implemented Interfaces:
BotStrategy
Implements a bot strategy that makes random moves based on the available moves in the game state.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbestMove()Returns the best move for the current game state.
-
Constructor Details
-
Random
Constructs a newRandombot strategy instance with the given game state.- Parameters:
state- the current game state
-
-
Method Details
-
bestMove
public int bestMove()Description copied from interface:BotStrategyReturns the best move for the current game state.- Specified by:
bestMovein interfaceBotStrategy- Returns:
- the index of the best move to make
-