19 lines
316 B
Go
19 lines
316 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Ennoblement struct {
|
|
ID int
|
|
Village VillageMeta
|
|
NewOwner PlayerMeta
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
func (e Ennoblement) IsBarbarian() bool {
|
|
return !e.Village.Player.Valid
|
|
}
|
|
|
|
func (e Ennoblement) IsSelfConquer() bool {
|
|
return e.NewOwner.ID == e.Village.Player.Player.ID
|
|
}
|