Dawid Wysokiński
c7efe7a240
All checks were successful
continuous-integration/drone/push Build is passing
19 lines
329 B
Go
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
|
|
}
|