Sikta_26785, on 06 October 2012 - 10:59 AM, said:
I see some issues with your code. First of all, what is the point in returning a bool if it will always be false? You might as well define the method as public void Run() in this case. Also, this is going to have each dog run from beginning to end 1 at a time. You could count the number of times through the loop and use this as the amount of time it took them to run the race, return that value as your return type from the run method and whichever had the smallest number won the race. But it would be more like individual time trials and not really a "race" then.
First , thanx for your reply, is good to see people take the time to check some new user's problems.
I probably didnt make myself clear, but this is not the whole program, just the "Run" method.
As for the bool, im following the book example here, 2nd edition , page 172 in this case i would use Return to check who won the race, because the first one to reach the line would then get OUT of the while loop, I do think ive made a mistake and the Return outside the While loop should be True, then use that return in my code to end the race and mark the winner.