player.gamer.statemachine.sadna

## Class TrainingPlayer

- java.lang.Object
- - player.gamer.statemachine.sadna.TrainingPlayer

-     public class TrainingPlayer
      extends java.lang.Object

  Player used to Connect Four training

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrainingPlayer(double[] startingWeights)`
    `TrainingPlayer(double[] startingWeights, int treeDepth)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `didWin()`
    `double[]` | `getWeights()`
    `void` | `opponentWon(int opponentMove)` Opponent won the game
    `int` | `playMove(int opponentMove)` Play one move in Connect Four game

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TrainingPlayer

          public TrainingPlayer(double[] startingWeights,
                        int treeDepth)

    - #### TrainingPlayer

          public TrainingPlayer(double[] startingWeights)

  - ### Method Detail

    - #### playMove

          public int playMove(int opponentMove)

      Play one move in Connect Four game
      Parameters:
        `opponentMove` - The last move the opponent made
      Returns:
        the move the player made (the column it drop the coin in)

    - #### didWin

          public boolean didWin()

    - #### getWeights

          public double[] getWeights()

    - #### opponentWon

          public void opponentWon(int opponentMove)

      Opponent won the game
      Parameters:
        `opponentMove` - The last move the opponent made