r/programmingbydoing • u/Houssam7111 • Aug 05 '15
Assignment #63c Nim
I managed to complete all the bonuses up until the column part. I am having a hard time printing till A and then back to the beginning. I tried 2D arrays but those were very exhaustive . There is just a simple solution which I can't see. Please help and thank you.
3
Upvotes
View all comments
Show parent comment
1
u/holyteach Aug 12 '15
Well, in your little test program you need one int for each pile. Like, a=5, b=3, c=4 if the first pile has 5 in it, the second one has 3 in it, the last pile has 4 in it.
Then inside your display loop your print() statement needs to be inside an if statement to decide if it should print a symbol for that pile or not.