package com.gh.gamecenter.entity

import android.os.Parcel
import android.os.Parcelable

/**
 * Created by khy on 20/06/17.
 */

class GameDetailRelatedGame : Parcelable {

    var score: String? = null

    var game: List<String>? = null

    override fun describeContents(): Int {
        return 0
    }

    override fun writeToParcel(dest: Parcel, flags: Int) {
        dest.writeString(this.score)
        dest.writeStringList(this.game)
    }

    constructor()

    protected constructor(`in`: Parcel) {
        this.score = `in`.readString()
        this.game = `in`.createStringArrayList()
    }

    companion object {

        @JvmField
        val CREATOR: Parcelable.Creator<GameDetailRelatedGame> = object : Parcelable.Creator<GameDetailRelatedGame> {
            override fun createFromParcel(source: Parcel): GameDetailRelatedGame {
                return GameDetailRelatedGame(source)
            }

            override fun newArray(size: Int): Array<GameDetailRelatedGame?> {
                return arrayOfNulls(size)
            }
        }
    }
}
