forget what i did

This commit is contained in:
Jeffrey Duroyon
2020-05-06 01:23:40 +02:00
parent f982922ef3
commit f00db120f2
6 changed files with 49 additions and 65 deletions

View File

@@ -54,7 +54,7 @@ func (h *Hamster) Die() {
func (h *Hamster) Grow() {
if h.Age >= MaxAge {
if randNumber(h.Age-MaxAge,365) > 364 {
if randNumber(h.Age-MaxAge, 365) > 364 {
h.Die()
return
}
@@ -82,11 +82,11 @@ func (h *Hamster) Fuck(another *Hamster) (bool, error) {
rand := randNumber(1, 100)
if rand <= GestationLuck {
female,male := func() (*Hamster,*Hamster) {
female, male := func() (*Hamster, *Hamster) {
if h.Sexe == FEMALE {
return h,another
return h, another
} else {
return another,h
return another, h
}
}()
female.GestationFather = male