dcbot/internal/domain/ennoblement.go
Dawid Wysokiński c7efe7a240
All checks were successful
continuous-integration/drone/push Build is passing
refactor: split domain/tw.go into multiple files
2023-07-09 08:06:53 +02:00

19 lines
329 B
Go

package domain
import "time"
type Ennoblement struct {
ID int64
Village VillageMeta
NewOwner NullPlayerMeta
CreatedAt time.Time
}
func (e Ennoblement) IsBarbarian() bool {
return !e.Village.Player.Valid
}
func (e Ennoblement) IsSelfConquer() bool {
return e.NewOwner.Player.ID == e.Village.Player.Player.ID
}