perl base class for board games