Skip to content

Instantly share code, notes, and snippets.

@explorer14
Last active June 22, 2020 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/98cb76efd1657f134181992d85440f19 to your computer and use it in GitHub Desktop.
Save explorer14/98cb76efd1657f134181992d85440f19 to your computer and use it in GitHub Desktop.
public sealed class RoverOperationUsecase
{
private readonly IRetrieveRoverCommands roverCommandRetriever;
private readonly ITransmitRoverPosition roverPositionTransmitter;
public RoverOperationUsecase(
IRetrieveRoverCommands roverCommandRetriever,
ITransmitRoverPosition roverPositionTransmitter)
{
this.roverCommandRetriever = roverCommandRetriever;
this.roverPositionTransmitter = roverPositionTransmitter;
}
public async Task StartRoverOperation()
{
// 1. Get all commands from the IRetrieveRoverCommands port
// 2. Loop over all the commands and execute them against the rover one by one
// 3. Publish rover's current position to the output port ITransmitRoverPosition
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment