K ♦Syntax for try/catch?51

Warm ups:

  • Write the syntax pattern for a try/catch block
  • Write the syntax pattern for checking if a reference is null
  • Write the syntax pattern for throwing an exception

Writing Challenge: Change PlayableMonster's nextAction() method to give the player a way to move in all directions. Throw an exception if the direction is not possible.