Bug Fix for Ship.java

The changed code should no longer experience an ArrayIndexOutOfBoundsException when it reaches here.