Simulation
Date: 2017-05-13

game_frontend

## Class Simulation

- java.lang.Object
- - game_frontend.Match
  - - game_frontend.Simulation

-     public class Simulation
      extends Match

  Constitutes a simulation variant of the play mode. The game is played automatically following the strategy implemented in order to obtain long term statistics
  Author:
    João Vieira, Guilherme Reis, Catarina Santos

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class game_frontend.Match

      `Match.States`

  - ### Field Summary

    - ### Fields inherited from class game_frontend.Match

      `actualBet, discarded, game, initialCredit, player`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Simulation(int credits, int bet, int nDeals)` Constructor of simulation mode

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `advice()` Simpler implementation of advice without prints to the console
    `boolean` | `bet(int amount)` Simpler implementation of bet that fully eliminates the verifications and the prints to console
    `java.lang.String` | `deal()` Simpler implementation of deal without prints to console
    `java.lang.String` | `hold(int[] positions)` Simpler implementation of hold without prints to the console

    - ### Methods inherited from class game_frontend.Match

      `credit, getStats`

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

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

- - ### Constructor Detail

    - #### Simulation

          public Simulation(int credits,
                            int bet,
                            int nDeals)

      Constructor of simulation mode
      Parameters:
        `credits` - Amount of credit that the player has initially
        `bet` - Amount of each bet made
        `nDeals` - Number of deals to make

  - ### Method Detail

    - #### bet

          public boolean bet(int amount)

      Simpler implementation of bet that fully eliminates the verifications and the prints to console
      Overrides:
        `bet` in class `Match`
      Parameters:
        `amount` - Amount to bet
      Returns:
        boolean true in success or false otherwise
      See Also:
        `Match.bet(int)`

    - #### deal

          public java.lang.String deal()

      Simpler implementation of deal without prints to console
      Overrides:
        `deal` in class `Match`
      Returns:
        String Actual hand of player
      See Also:
        `Match.deal()`

    - #### hold

          public java.lang.String hold(int[] positions)

      Simpler implementation of hold without prints to the console
      Overrides:
        `hold` in class `Match`
      Parameters:
        `positions` - Positions of the cards that are to maintain
      Returns:
        String Final hand of the player in this round
      See Also:
        `Match.hold(int[])`

    - #### advice

          public int[] advice()

      Simpler implementation of advice without prints to the console
      Overrides:
        `advice` in class `Match`
      Returns:
        int[] Positions of the cards that the user should hold
      See Also:
        `Match.advice()`