forget what i did
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user