Class GamePlay

java.lang.Object
edu.tufts.hrilab.polycraft.GamePlay

public final class GamePlay extends Object
  • Constructor Details

    • GamePlay

      public GamePlay(int port)
  • Method Details

    • reset

      public void reset()
      Reset cached game info/state between games.
    • hasGameStateChanged

      public boolean hasGameStateChanged()
      Check if game state has changes since game state was last updated.
      Returns:
    • getLastSenseAction

      public Sense getLastSenseAction()
      Get the most recent SenseAll used to populate the gameState prover.
      Returns:
    • updateGameState

      public void updateGameState()
      Update the game state by calling SenseAll.
    • getGameState

      public Prover getGameState()
      Get the current game state (from SenseAll) and return a Prolog instance populated with senseall results.
      Returns:
    • getLastActionTaken

      public GameAction getLastActionTaken(String command)
    • perform

      public void perform(GameAction action)