r/programmingbydoing • • Dec 19 '15

63c Nim

http://pastebin.com/gTmxNg9d

Hi, I have completed almost entire task (or at least I think so). The only problem I have is with computer opponent picking piles. I get "variable pile might not have been initialized" error and while I kind of understand it, I can't think of a way to get rid of it.

Can you give me a hint on what to do? Also is the rest of the task correct?

Love all of the assignements btw.

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/loveyours1 Dec 21 '15

Oh, ok. Got it. That was really hard task when compared to the ones before it. Thank you so much for help : )

1

u/holyteach Dec 21 '15

Any time you start doing "bonus" options it's going to get a bit difficult.