Simply call the method and use the returned value (the head count) in the while loop or if statement.
Type: Posts; User: Junky
Simply call the method and use the returned value (the head count) in the while loop or if statement.
You could use an if statement: if coin1 has 3 heads print coin one wins else print coin two wins. Up for debate: should headCount be a instance variable of Coin?