add missing path property handling

This commit is contained in:
Jeffrey Duroyon
2020-05-18 00:56:43 +02:00
parent ca8e42388b
commit f6e0a826a1
21 changed files with 292 additions and 114 deletions

View File

@@ -51,6 +51,7 @@ type Hamster struct {
Child []*Hamster `json:"childs"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
Cage *Cage `json:"cage"`
}
func (h *Hamster) Die() {
@@ -90,9 +91,8 @@ func (h *Hamster) Fuck(another *Hamster) (bool, error) {
female, male := func() (*Hamster, *Hamster) {
if h.Sexe == FEMALE {
return h, another
} else {
return another, h
}
return another, h
}()
female.GestationFather = male
female.Gestation = true
@@ -147,9 +147,8 @@ func randSexe() string {
return func() string {
if randNumber(1, 2) == 2 {
return MALE
} else {
return FEMALE
}
return FEMALE
}()
}