Skip to main content
1 vote

Pset 3 runoff. Votes not updating, trying to understand the code sequencing

One problem I see: In tabulate() for(int i = 0; i > voter_count; i++) I think you meant to write i < voter_count because otherwise it will not enter the loop since your condition will turn out ...
smitha's user avatar
  • 13
1 vote
Accepted

Game of Fifteen - Move Function - getting wrong coordinates?

(new reply as I misread!) You would expect when tile==3, that x,y is 1,2 : 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 Remember, it's row,col so what you are seeing is correct. (Your init is doing the ...
curiouskiwi's user avatar
  • 18.7k

Only top scored, non community-wiki answers of a minimum length are eligible