Skip to content

Instantly share code, notes, and snippets.

@wallstop
Created June 4, 2015 06:18
Show Gist options
  • Save wallstop/dc047d4855d0f179747a to your computer and use it in GitHub Desktop.
Save wallstop/dc047d4855d0f179747a to your computer and use it in GitHub Desktop.
final boolean validMove = Arrays.asList(actions).contains(action);
if(!validMove) {
throw new IllegalStateException(String.format("%s did not enter a valid move, (other player) wins!", p));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment