51 lines
790 B
Go
51 lines
790 B
Go
package challenge
|
|
|
|
import "time"
|
|
|
|
type Config struct {
|
|
Floors int
|
|
Monsters int
|
|
OpenAt string
|
|
Duration int
|
|
}
|
|
|
|
type Event struct {
|
|
At time.Duration
|
|
Player int
|
|
ID int
|
|
Extra string
|
|
}
|
|
|
|
type ResultState string
|
|
|
|
const (
|
|
StateSuccess ResultState = "SUCCESS"
|
|
StateFail ResultState = "FAIL"
|
|
StateDisqual ResultState = "DISQUAL"
|
|
)
|
|
|
|
type Player struct {
|
|
ID int
|
|
Health int
|
|
Registered bool
|
|
InDungeon bool
|
|
Attempted bool
|
|
Terminal bool
|
|
Disqual bool
|
|
Dead bool
|
|
Left bool
|
|
|
|
EnteredAt time.Duration
|
|
EndedAt time.Duration
|
|
|
|
Floor int
|
|
MonsterKills []int
|
|
FloorDurations []time.Duration
|
|
floorTimerOn bool
|
|
floorTimerAt time.Duration
|
|
|
|
BossEntered bool
|
|
BossKilled bool
|
|
BossEnterAt time.Duration
|
|
BossTime time.Duration
|
|
}
|