From f2768e8babcea4fd23f7e25cb19650cd61fd1015 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 14 Apr 2024 04:28:39 +0000 Subject: Sat, Apr 13, 2024, 9:28 PM -07:00 --- wk5/pset/inheritance/inheritance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wk5/pset/inheritance/inheritance.c') diff --git a/wk5/pset/inheritance/inheritance.c b/wk5/pset/inheritance/inheritance.c index 0f3fd13..f7d7b5d 100644 --- a/wk5/pset/inheritance/inheritance.c +++ b/wk5/pset/inheritance/inheritance.c @@ -66,8 +66,8 @@ person *create_family(int generations) new->parents[1] = NULL; // TODO: Randomly assign alleles - // new->alleles[0] = round(random() / ((double) RAND_MAX + 1)); - // new->alleles[1] = round(random() / ((double) RAND_MAX + 1)); + new->alleles[0] = round(random()) % 3; + new->alleles[1] = round(random()) % 3; } // TODO: Return newly created person -- cgit v1.2.3