2020-09-23 20:51:45 +00:00
|
|
|
package dev.araozu
|
|
|
|
|
|
|
|
data class DatosJuego(
|
|
|
|
val dora: Array<Int>,
|
|
|
|
val doraOculto: Array<Int>,
|
|
|
|
val manos: HashMap<String, Mano>,
|
|
|
|
val cartasRestantes: Int,
|
2020-09-25 02:05:28 +00:00
|
|
|
val ordenJugadores: Array<String>,
|
|
|
|
val turnoActual: String
|
2020-09-23 20:51:45 +00:00
|
|
|
) {
|
|
|
|
|
|
|
|
override fun equals(other: Any?): Boolean {
|
|
|
|
if (this === other) return true
|
|
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
|
|
|
|
other as DatosJuego
|
|
|
|
|
|
|
|
if (!dora.contentEquals(other.dora)) return false
|
|
|
|
if (!doraOculto.contentEquals(other.doraOculto)) return false
|
|
|
|
if (manos != other.manos) return false
|
|
|
|
if (cartasRestantes != other.cartasRestantes) return false
|
|
|
|
if (!ordenJugadores.contentEquals(other.ordenJugadores)) return false
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
override fun hashCode(): Int {
|
|
|
|
var result = dora.contentHashCode()
|
|
|
|
result = 31 * result + doraOculto.contentHashCode()
|
|
|
|
result = 31 * result + manos.hashCode()
|
|
|
|
result = 31 * result + cartasRestantes
|
|
|
|
result = 31 * result + ordenJugadores.contentHashCode()
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|