package model import korlibs.time.* sealed interface HistoryEntry: Comparable { val timestamp: TimeSpan val pendingEffects: List val battlers: List override fun compareTo(other: HistoryEntry): Int { return timestamp.compareTo(other.timestamp) } } data class ActionHistoryEntry( val action: BattleAction, override val pendingEffects: List, override val battlers: List, ): HistoryEntry { override val timestamp: TimeSpan get() = action.timestamp } data class EffectHistoryEntry( val effect: BattleEffect, override val pendingEffects: List, override val battlers: List, ): HistoryEntry { override val timestamp: TimeSpan get() = effect.timestamp }