feat: add unit test
This commit is contained in:
@@ -17,7 +17,7 @@ const (
|
||||
const (
|
||||
TotalGestationPeriod = 15
|
||||
MinChild = 5
|
||||
MaxCild = 9
|
||||
MaxChild = 9
|
||||
GestationCooldown = (3 * 7) + 2
|
||||
GestationMinAge = 10 * 6
|
||||
MaxAge = 365 * 2
|
||||
@@ -114,7 +114,7 @@ func Born(father *Hamster, mother *Hamster) ([]*Hamster, error) {
|
||||
}
|
||||
|
||||
func randNumberChild() int {
|
||||
return randNumber(MinChild, MaxCild)
|
||||
return randNumber(MinChild, MaxChild)
|
||||
}
|
||||
|
||||
func randSexe() string {
|
||||
@@ -128,5 +128,5 @@ func randSexe() string {
|
||||
}
|
||||
|
||||
func randNumber(min int, max int) int {
|
||||
return min + randomizer.Rand(max-min)
|
||||
return min + randomizer.Rand(max)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user