public async void Execute(object parameter) { var client = new RoverServiceClient(); VM.Result = await client.SetupRoverAsync(VM.InitialPositionX, VM.InitialPositionY, VM.HeadingChar); VM.CurrentRover = new MarsRoverApiModel.Rover(VM.InitialPositionX, VM.InitialPositionY, VM.HeadingChar); }
public async void Execute(object parameter) { var client = new RoverServiceClient(); VM.Result = await client.SetupPlateauAsync(VM.UpperBoundX, VM.UpperBoundY); VM.CurrentPlateau = new MarsRoverApiModel.Plateau(VM.UpperBoundX, VM.UpperBoundY); VM.Path = null; }
public async void Execute(object parameter) { var client = new RoverServiceClient(); VM.Result = await client.MoveAsync(VM.Command); VM.CurrentRover.Move(VM.Command, VM.CurrentPlateau); VM.Path = VM.CurrentRover.Path; VM.Command = ""; VM.RaiseRedrawCanvas(); }
public async void Execute(object parameter) { var client = new RoverServiceClient(); var history = await client.GetHistoryAsync(); if (history != null) { await VM.Navigation.PushAsync(new HistoryPage { BindingContext = history }); } }