New proposal for numerical simulations of theta-vacuum-like systems