Position and direction on grid
Movement is in the following rules: 1. At a white square on my grid(indicated by a zero),turn 90 degrees right, move forward one square. 2.At a black square on my grid(indicated by a one), turn 90 degrees left, move forward one square Basically I need to get the new location on my grid after I was on a certain location. Code needs to accept the colour of the cell I'm currently at, as well as position and direction I am facing and computes the cell's new colour, new position and direction after taking a single step. INPUT: The first line of input is a single integer, representing the colour of the cell. The next line consists of two integers m and n and a character d, separated by a single space, specifying the row and column location of the ant, and the direction it is facing (either N, S, E, or W for the four cardinal directions). for example. Input: 1 3 2 E Output: 0 2 2 N https://code.sololearn.com/cyW9P3xVI3Bd/?ref=app