text: 
  
  class GameEvent {
    constructor(game) {
      this.game = game;
      this.type = type;
      this.notification = this.notification;
      this.text = text;
      this.value = value;
      this.stat = stat;
    }
  
    stateChangeEvent(eventData) {
       //can't have negative quantities
      if(eventData.value + this.caravan[eventData.stat] >= 0) {
        this.caravan[eventData.stat] += eventData.value;
        this.ui.notify(eventData.text + Math.abs(eventData.value), eventData.notification);
      }
    }
  
    attackEvent() {
      var firepower = Math.round((0.7 + 0.6 * Math.random()) * OregonH.ENEMY_FIREPOWER_AVG);
      var gold = Math.round((0.7 + 0.6 * Math.random()) * OregonH.ENEMY_GOLD_AVG);
     
      this.ui.showAttack(firepower, gold);
    }
  
    generateEvent() {
       //pick random one
      var eventIndex = Math.floor(Math.random() * this.eventTypes.length);
      var eventData = this.eventTypes[eventIndex];
    
      //events that consist in updating a stat
      if(eventData.type == 'STAT-CHANGE') {
        this.stateChangeEvent(eventData);
      }
    
      //shops
      else if(eventData.type == 'SHOP') {
        //pause game
        this.game.pauseJourney();
    
        //notify user
        this.ui.notify(eventData.text, eventData.notification);
    
        //prepare event
        this.shopEvent(eventData);
      }
    
      //attacks
      else if(eventData.type == 'ATTACK') {
        //pause game
        this.game.pauseJourney();
    
        //notify user
        this.ui.notify(eventData.text, eventData.notification);
    
        //prepare event
        this.attackEvent(eventData);
      }
    }
    
    makeEvent() {
      const { type, notification, text, value, products, stat} = obj // {type, value. stat}
      switch(obj.type) {
        case 'ATTACK':
          return new EventType(type, notification, text)
          // if not a return you would need a break
        case 'STAT_CHANGE':
          return new StatChange(type, notification, text, value, stat)
        case 'SHOP':
          return new ShopEvent(type, notification, text, products)
        default:
          // just in case wrong type data given, what do we do?
          return { }
      }
    }
  
    shopEvent() {
      //number of products for sale
      var numProds = Math.ceil(Math.random() * 4);
    
      //product list
      var products = [];
      var j, priceFactor;
    
      for(var i = 0; i < numProds; i++) {
        //random product
        j = Math.floor(Math.random() * eventData.products.length);
    
        //multiply price by random factor +-30%
        priceFactor = 0.7 + 0.6 * Math.random();
    
        products.push({
          item: eventData.products[j].item,
          qty: eventData.products[j].qty,
          price: Math.round(eventData.products[j].price * priceFactor)
        });
      }
    
      this.ui.showShop(products);
    }
  
  }
  
  
  for (let i = 0; i < DataCue.length; i += 1) {
    const obj = data[i]
    const event = makeEvent(obj)
    this.Event.eventTypes.push(event)
  };
  
   = new Event()