app/models/PlayerAgent.js
//convert it into a serializable js object
convert it into a serializable js object
convert it into a serializable js object
toSerializable() {
    return Object.assign(
      {},
      {
        name: this.name,
        card_counter: this.card_counter,
        balance: this.balance,
        score: this.score,
        type: this.type,
        cur_payment: this.cur_payment,
        cur_payFrequency: this.cur_payFrequency,
        card_weights: this.card_weights,
        dailyDrawFrequency: this.dailyDrawFrequency,
        WTP: this.WTP,
        WTP_reverse: this.WTP_reverse,
        totalDraw: this.totalDraw,
        totalSpending: this.totalSpending,
        prefixSum_weights: this.prefixSum_weights,
        card_list: this.card_list,
        estimatedDailyDraw :this.estimatedDailyDraw
      }
    )
  }
toSerializable ( ) { return Object . assign ( { } , { name : this . name , card_counter : this . card_counter , balance : this . balance , score : this . score , type : this . type , cur_payment : this . cur_payment , cur_payFrequency : this . cur_payFrequency , card_weights : this . card_weights , dailyDrawFrequency : this . dailyDrawFrequency , WTP : this . WTP , WTP_reverse : this . WTP_reverse , totalDraw : this . totalDraw , totalSpending : this . totalSpending , prefixSum_weights : this . prefixSum_weights , card_list : this . card_list , estimatedDailyDraw : this . estimatedDailyDraw } ) }
convert it into a serializable js object
convert it into a serializable js object