Add project files.

This commit is contained in:
2022-09-13 02:43:55 +03:00
parent 2dec4b1dc5
commit 9e39314500
74 changed files with 2336 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
namespace MartianRobotsSolver
{
public class RobotCommandRight : IRobotCommand
{
public string Command => "R";
public void Process(RobotInfo robotInfo)
{
var hIndex = RobotCommandConstants.HEADING.IndexOf(robotInfo.Head)+1;
if(hIndex>RobotCommandConstants.HEADING.Length-1)
hIndex = 0;
robotInfo.Head = RobotCommandConstants.HEADING[hIndex].ToString();
}
}
}