xonecas.ioDon't click! Sean Caetano Martin Sign in
tiny-adventure / internal / model / clock.go 10 lines234 bytes Raw
1package model
2
3type Clock struct {
4	Day         int `json:"day"`
5	Time        int `json:"time"`
6	DayLength   int `json:"dayLength"`
7	NightLength int `json:"nightLength"`
8}
9
10func (c Clock) Night() bool { return c.Time >= c.DayLength }