Add error message for illegal moves

Also this is my first commit made in eclipse.