A person is guilty of criminal trespass if he knowingly enters or remains unlawfully in a building or on real property adjacent thereto, or upon real property adjacent thereto, or upon real property which is fenced or otherwise enclosed in a manner designed to exclude intruders, or if he knowingly enters or remains unlawfully in or upon premises of another. In any prosecution under this section, it is a defense that:
A. The premises were at the time open to members of the public and the actor complied with all lawful conditions imposed on access to or remaining in the premises; or
B. The actor reasonably believed that the owner of the premises, or other person empowered to license access thereto, would have licensed him to enter or remain.
(Ord. 268 § 2, 1979)