In SnakeProBrain.java -> keyPressed():
Fill in the blanks within keyPressed in SnakeProBrain.java so that when you press the relevant key, the direction is set using the methods in SnakeProData.java (setDirectionNorth(), setDirectionSouth(), setDirectionEast(), setDirectionWest() ). Make sure you use the private static final variables like the examples that use AI_MODE and REVERSE
While you can write this code using “if”, you are probably better off learning to use switch statements:
Of course, nothing will happen yet when you press the ‘a’ or ‘r’ keys (i.e., there won’t be an AI mode or reverse functionality because you haven’t written the code for that functionality yet).
After completing this step you should be able to run SnakeProBrain.java and play your Snake Pro game! There are no specific tests for this but you should play the game to make sure that it works well.