malmobasicmovements
namespace Malmo06 | |
{ | |
class Program | |
{ | |
private static AgentHost _agentHost; | |
private static MissionSpec _mission; | |
private static MissionRecordSpec _missionRecord; | |
private static WorldState _worldState; | |
public static void Main() | |
{ | |
InitAgentHost(); | |
InitMissionSpecs(); | |
StartMission(); | |
WaitMissionToStart(); | |
Console.WriteLine("Mission in progress !"); | |
Console.WriteLine(); | |
int i = 0; | |
do | |
{ | |
i++; | |
var command = "move 0.5"; | |
if (i > 3) | |
{ | |
i = 0; | |
command = "turn 0.5"; | |
_agentHost.sendCommand(command); | |
Thread.Sleep(500); | |
command = "turn 0"; | |
_agentHost.sendCommand(command); | |
Thread.Sleep(500); | |
} | |
else | |
{ | |
_agentHost.sendCommand(command); | |
Thread.Sleep(1000); | |
} | |
Console.WriteLine($"{i} - command: {command}"); | |
// Move | |
} while (_worldState.is_mission_running); | |
Console.WriteLine("Mission has stopped."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment