Class TwoPhaseMoveGame<T>

java.lang.Object
game.console.AbstractGame<TwoPhaseMoveState<T>, T>
game.console.TwoPhaseMoveGame<T>
Type Parameters:
T - represents the moves that can be applied to the states

public class TwoPhaseMoveGame<T> extends AbstractGame<TwoPhaseMoveState<T>, T>
Conducts a two-player game of the two-phase move-type on the console.
  • Constructor Details

    • TwoPhaseMoveGame

      public TwoPhaseMoveGame(TwoPhaseMoveState<T> state, Function<String,T> parser)
      Creates a TwoPhaseMoveGame instance to conduct a two-player game of the two-phase move-type on the console.
      Parameters:
      state - the state from which the game is started
      parser - a function that converts a line read from the console to a move
      Throws:
      AssertionError - if the console is not available
  • Method Details