Shiptype implementation and unittest