Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Microsoft/malmo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim.Hutton committed Aug 16, 2016
2 parents b0e6151 + c62fb40 commit 672a689
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Malmo/src/ALEAgentHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,17 @@ namespace malmo

WorldState old_world_state( this->world_state );
this->world_state.clear();
this->world_state.has_mission_begun = this->ale_interface;
this->world_state.has_mission_begun = this->ale_interface != 0;
this->world_state.is_mission_running = this->ale_interface && !this->ale_interface->game_over();

return old_world_state;
}

std::string ALEAgentHost::getRecordingTemporaryDirectory() const
{
return this->current_mission_record && this->current_mission_record->isRecording() ? this->current_mission_record->getTemporaryDirectory() : "";
}

void ALEAgentHost::setVideoPolicy(AgentHost::VideoPolicy videoPolicy)
{
this->video_policy = videoPolicy;
Expand Down
6 changes: 5 additions & 1 deletion Malmo/src/ALEAgentHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace malmo

//! Set the random seed used to seed the ALE.
//! If 0 (the default), the ALE will use the current time instead.
void setRandomSeed(int seed) { this->seed = seed; }
void setSeed(int seed) { this->seed = seed; }

//! Starts a mission running. Throws an exception if something goes wrong.
//! \param mission The mission specification.
Expand All @@ -77,6 +77,10 @@ namespace malmo
//! \returns The world state.
WorldState getWorldState();

//! Gets the temporary directory being used for the mission record, if recording is taking place.
//! \returns The temporary directory for the mission record, or an empty string if no recording is going on.
std::string getRecordingTemporaryDirectory() const;

//! Specifies how you want to deal with multiple video frames.
//! \param videoPolicy How you want to deal with multiple video frames coming in asynchronously.
void setVideoPolicy(AgentHost::VideoPolicy videoPolicy);
Expand Down

0 comments on commit 672a689

Please sign in to comment.