added unit_factory and tank constructor to unit class