-
-
Save explorer14/aeb856e067789b725664850102357c0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public readonly struct RoverCommandParameters | |
{ | |
public RoverCommandParameters( | |
int terrainMaxX, | |
int terrainMaxY, | |
int currentRoverPositionX, | |
int currentRoverPositionY, | |
Direction currentRoverHeading, | |
params RoverCommands[] manouvreCommands) | |
{ | |
Terrain = new Terrain(terrainMaxX, terrainMaxY); | |
RoverInitialisationParameters = new RoverInitialisationParameters( | |
currentRoverPositionX, | |
currentRoverPositionY, | |
currentRoverHeading); | |
ManouvreCommands = manouvreCommands; | |
} | |
public Terrain Terrain { get; } | |
public RoverInitialisationParameters RoverInitialisationParameters { get; } | |
public RoverCommands[] ManouvreCommands { get; } | |
} | |
public enum RoverCommands | |
{ | |
TurnLeft = 0, | |
TurnRight = 1, | |
Move = 2 | |
} | |
public readonly struct RoverInitialisationParameters | |
{ | |
public RoverInitialisationParameters( | |
int currentRoverPositionX, | |
int currentRoverPositionY, | |
Direction currentRoverHeading) | |
{ | |
CurrentRoverPositionX = currentRoverPositionX; | |
CurrentRoverPositionY = currentRoverPositionY; | |
CurrentRoverHeading = currentRoverHeading; | |
} | |
public int CurrentRoverPositionX { get; } | |
public int CurrentRoverPositionY { get; } | |
public Direction CurrentRoverHeading { get; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment