public static void TurnRight(this Rover rover) { heading = ((int)heading + 1) > (int)DirectionEnum.W ? DirectionEnum.N : (DirectionEnum)((int)heading + 1); }
public static string CurrentPosition(this Rover rover) { return(rover.position.x + " " + rover.position.y + " " + rover.heading); }
public static void TurnLeft(this Rover rover) { heading = ((int)heading - 1) < (int)DirectionEnum.N ? DirectionEnum.W : (DirectionEnum)((int)heading - 1); }