NSLog(@"Number: %f", [self calculateScore]);
- (CGFloat)calculateScore {
CGFloat score;
score = (_bestPossibleMove/_movesMade) * 5.0;
return score;
}
So I have 2 instance variables _bestPossibleMove and _movesMade. The former is set to 6.0 from the start, and the latter will be 16.0 by the time the game is completed. When I get to the NSLog message, calling [self calculateScore] keeps giving me 0.0000 when it should be giving me a number slightly smaller than 5.0 and greater than 0.0. Any reason for this?