Instruction
Great! We have all the helper functions we need to create the actual function for moving a robot forward.
Exercise
Create a function named move_forward(board, robot). The function should move the robot by 1 field in the direction it is facing – unless the new field is occupied by the other robot or the new field is outside the game board.
- Check where the robot is now.
- Calculate the robot's new position after moving forward.
- If the new position is within the board and the new position is empty (not occupied by the other robot), update the board: the new position should now be occupied by the robot, and the old position should become empty (
'-').
Stuck? Here's a hint!
Use all the helper functions we've created. To insert an empty field into the board, use the following code:
board[current_row][current_column] = '-'



