Implemented the method getType in spaceship