text: 'use strict';
  
  var NameGenerator = function NameGenerator() {};
  
  NameGenerator.prototype.make = function (excludeNames) {
      var _this = this,
          names = require('../../resources/dict/animals.json');
  
      if (typeof excludeNames != 'undefined') {
          names = _this.filterExcludedNames(names, excludeNames);
      }
  
      return _this.getRandomName(names);
  };
  
  NameGenerator.prototype.getRandomName = function (names) {
      return names[Math.floor(Math.random() * names.length)];
  };
  
  NameGenerator.prototype.filterExcludedNames = function (names, excludes) {
      var uniqueNames = [];
  
      for (var i = 0; i < names.length; i++) {
          if (excludes.indexOf(names[i]) !== -1) {
              continue;
          }
          uniqueNames.push(names[i]);
      }
  
      return uniqueNames;
  };
  
  module.exports = NameGenerator;
  