Municipalities of less than five thousand inhabitants may regulate pool rooms and turf exchanges and provide penalties for the violation of ordinances adopted under authority of this Section.