Package edu.tufts.hrilab.polycraft
Class GamePlay
java.lang.Object
edu.tufts.hrilab.polycraft.GamePlay
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current game state (from SenseAll) and return a Prolog instance populated with senseall results.getLastActionTaken
(String command) Get the most recent SenseAll used to populate the gameState prover.boolean
Check if game state has changes since game state was last updated.void
perform
(GameAction action) void
reset()
Reset cached game info/state between games.void
Update the game state by calling SenseAll.
-
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
Get the most recent SenseAll used to populate the gameState prover.- Returns:
-
updateGameState
public void updateGameState()Update the game state by calling SenseAll. -
getGameState
Get the current game state (from SenseAll) and return a Prolog instance populated with senseall results.- Returns:
-
getLastActionTaken
-
perform
-