## Uses of Class
s3games.engine.Move

- Packages that use Move
  Package | Description
  --- | ---
  s3games.engine |
  s3games.gui |
  s3games.player |
  s3games.robot |

- - ### Uses of Move in s3games.engine

    Methods in s3games.engine that return Move
    Modifier and Type | Method and Description
    --- | ---
    `Move` | GameState.`findMove(GameState newState)` compares this state with newState, and returns a move that leads from this state to a new state

    Methods in s3games.engine that return types with arguments of type Move
    Modifier and Type | Method and Description
    --- | ---
    `java.util.ArrayList<Move>` | GameState.`allPossibleMoves()` return a list of moves that can be taken from this state - this includes ALL moves regardless that they are equal (because of irrelevance of locations or same element types)
    `java.util.ArrayList<Move>` | GameRule.`getMatchingMoves(Element el, GameSpecification specs, Context context)` list of moves that can be performed from this state with the element specified in the first argument
    `java.util.HashSet<Move>` | GameState.`possibleMoves()` return a list of moves that can be taken from this states - this includes only DIFFERENT moves, i.e.

    Methods in s3games.engine with parameters of type Move
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | GameRule.`matches(Move move, Context context)` verifies whether the specified move conforms to this rule in the provided context
    `boolean` | GameState.`moveAllowed(Move move)` verifies all rules, returns true, if the move is allowed, or false if not, does not modify the game state, does not make any followup actions, however executes all conditions of tested rules with all the consequences
    `void` | GameState.`moveElement(Move move, GameSpecification specs)` only updates the game state by moving element between two locations, does not test anything, does not apply any rules
    `void` | GameState.`performMove(Move move)` performs a move after it has been verified, executes follow-up action of the rule that maximizes the score, adds the score, important: the game is marked finished only if one of the players won, or rules specifically announced draw.

  - ### Uses of Move in s3games.gui

    Fields in s3games.gui declared as Move
    Modifier and Type | Field and Description
    --- | ---
    `Move` | GameWindow.`lastMove` the move that was performed for the mouse player

    Fields in s3games.gui with type parameters of type Move
    Modifier and Type | Field and Description
    --- | ---
    `java.util.ArrayList<Move>` | GameWindow.`allowedMoves` list of allowed moves

  - ### Uses of Move in s3games.player

    Methods in s3games.player that return Move
    Modifier and Type | Method and Description
    --- | ---
    `Move` | AStarPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` A* player makes a move - it searches all the way to find the closest winning state and performs a move that is leading towards it.
    `Move` | AbstractMonteCarloPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a move.
    `Move` | BreadthFirstSearchPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` take a move using BFS algorithm.
    `Move` | CameraPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` request the user to make a move, ask the camera to detect the visible objects and try to figure out what has been moved
    `Move` | DepthFirstSearchPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a move using DFS strategy - search the state space in depth, when finding a first winning state, return a move that is leading towards it
    `Move` | MiniMaxPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make one minimax move: try to expand the game tree as far as it gets, evaluating the rest with the heuristic when the time is used up
    `Move` | MousePlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` wait for the human user to perform a move and return it
    `abstract Move` | Player.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a single move
    `Move` | RandomGeneralPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` perform a random move

    Methods in s3games.player that return types with arguments of type Move
    Modifier and Type | Method and Description
    --- | ---
    `java.util.HashMap<Move,GameState>` | MiniMaxPlayer.`expand(GameState state, java.util.HashSet<Move> moves, double ratio)` the only difference to standard minimax player is that here we ignore some of the moves when we expand a move

    Methods in s3games.player with parameters of type Move
    Modifier and Type | Method and Description
    --- | ---
    `void` | Player.`otherMoved(Move move, GameState newState)` information about the move made by another player - override if needed

    Method parameters in s3games.player with type arguments of type Move
    Modifier and Type | Method and Description
    --- | ---
    `java.util.HashMap<Move,GameState>` | MiniMaxPlayer.`expand(GameState state, java.util.HashSet<Move> moves, double ratio)` the only difference to standard minimax player is that here we ignore some of the moves when we expand a move
    `Move` | AStarPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` A* player makes a move - it searches all the way to find the closest winning state and performs a move that is leading towards it.
    `Move` | AbstractMonteCarloPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a move.
    `Move` | BreadthFirstSearchPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` take a move using BFS algorithm.
    `Move` | CameraPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` request the user to make a move, ask the camera to detect the visible objects and try to figure out what has been moved
    `Move` | DepthFirstSearchPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a move using DFS strategy - search the state space in depth, when finding a first winning state, return a move that is leading towards it
    `Move` | MiniMaxPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make one minimax move: try to expand the game tree as far as it gets, evaluating the rest with the heuristic when the time is used up
    `Move` | MousePlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` wait for the human user to perform a move and return it
    `abstract Move` | Player.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` make a single move
    `Move` | RandomGeneralPlayer.`move(GameState state, java.util.ArrayList<Move> allowedMoves)` perform a random move
    `protected abstract void` | AbstractMonteCarloPlayer.`updateRatio(GameState gs, java.util.Set<Move> moves)` update the ratio depending on the branching in the current state
    `protected void` | MonteCarloClassicPlayer.`updateRatio(GameState gs, java.util.Set<Move> moves)` classical monte-carlo does not update the ratio
    `protected void` | MonteCarloRatioPlayer.`updateRatio(GameState gs, java.util.Set<Move> moves)` opponent moves are taxing the ratio depending on the state neighborhood size
    `protected void` | MonteCarloRatioPlayer2.`updateRatio(GameState gs, java.util.Set<Move> moves)` update the current trial ratio every time a move is made

  - ### Uses of Move in s3games.robot

    Methods in s3games.robot with parameters of type Move
    Modifier and Type | Method and Description
    --- | ---
    `void` | Robot.`moveRobot(Move move)` perform a single move operation with the robot arm including picking and placing an element.